I have a editbox in my toolbar and want change background color
-
Hi, I have a SDI application with a editbox in the toolbar, now i want give the editbox another background color. Can someone help me with this? I have tried to put a WM_CTLCOLOR handler in CAppView and in CMainFrame, but i don't receive the WM_CTLCOLOR message. Thanks, Willem
-
Hi, I have a SDI application with a editbox in the toolbar, now i want give the editbox another background color. Can someone help me with this? I have tried to put a WM_CTLCOLOR handler in CAppView and in CMainFrame, but i don't receive the WM_CTLCOLOR message. Thanks, Willem
I believe you'll need to derive a class from CEdit. In that class, handle the WM_CTLCOLOR message.
-
I believe you'll need to derive a class from CEdit. In that class, handle the WM_CTLCOLOR message.
Thanks! The editbox works, but how can i add a messagehandler? The "Add Message Handler" menu is not there. I have tried this.
BEGIN_MESSAGE_MAP(CStatusEditBox, CEdit) ON_WM_CTLCOLOR() END_MESSAGE_MAP()
I get the following compiler error: 'GetMessageMap' : member function not declared in 'CStatusEditBox' -
Thanks! The editbox works, but how can i add a messagehandler? The "Add Message Handler" menu is not there. I have tried this.
BEGIN_MESSAGE_MAP(CStatusEditBox, CEdit) ON_WM_CTLCOLOR() END_MESSAGE_MAP()
I get the following compiler error: 'GetMessageMap' : member function not declared in 'CStatusEditBox'Did you use ClassWizard to derive CStatusEditBox from CEdit? The error message you got about GetMessageMap() was because the DECLARE_MESSAGE_MAP macro was missing from the CStatusEditBox class. You can add it manaully, but it's usually better to let ClassWizard do this, and more, for you.