Change Colour of CEdit on Dialog Bar
-
I have changed the text and background colours of CEdit's in dialog boxes in the past by overriding OnCtlColor. Now I'm trying to do the same thing with a CEdit in a Control Bar. I thought I would be able to override OnCtlColor in CMainFrame but I'm having trouble getting this to work. CMainFrame doesn't seem to receive the WM_CTLCOLOR messsages, although it receives and successfully handles many other messages from the bar:confused:. I attached the dialog bar to the CMainFrame in OnCreate like this: m_MessagesDlgBar.Create(this, IDD_MESSAGES, CBRS_BOTTOM, IDD_MESSAGES); Does anyone know where I'm going wrong? Any assistance would be gratefully received. Best Regards Cliff Hatch
-
I have changed the text and background colours of CEdit's in dialog boxes in the past by overriding OnCtlColor. Now I'm trying to do the same thing with a CEdit in a Control Bar. I thought I would be able to override OnCtlColor in CMainFrame but I'm having trouble getting this to work. CMainFrame doesn't seem to receive the WM_CTLCOLOR messsages, although it receives and successfully handles many other messages from the bar:confused:. I attached the dialog bar to the CMainFrame in OnCreate like this: m_MessagesDlgBar.Create(this, IDD_MESSAGES, CBRS_BOTTOM, IDD_MESSAGES); Does anyone know where I'm going wrong? Any assistance would be gratefully received. Best Regards Cliff Hatch
VS 2003 I created a dialog bar using the instructions in this article: (minus the InitDialog addition) http://support.microsoft.com/default.aspx?scid=kb;en-us;185672 then added a WM_CTLCOLOR handler from within the CDialogBar derived class. Worked fine for me.
:suss: Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
-
VS 2003 I created a dialog bar using the instructions in this article: (minus the InitDialog addition) http://support.microsoft.com/default.aspx?scid=kb;en-us;185672 then added a WM_CTLCOLOR handler from within the CDialogBar derived class. Worked fine for me.
:suss: Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Thanks Jack. It works fine for me too:) I have some other dialog bars that I will be able to convert usefully in this manner, to reduce the clutter in CMainFrame. Best Regards Cliff