lobrjos
asked on
Fonts and colors in a CEdit
How do you change the font, font color, and background color
of a CEdit control that has been placed on a view through code?
I have tried the function CWnd::SetFont() to no avail. When I do this nothing appears in the edit box when I type.
Thanks
of a CEdit control that has been placed on a view through code?
I have tried the function CWnd::SetFont() to no avail. When I do this nothing appears in the edit box when I type.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Simply put, when you do using the class wizard in MFC you must use the WM_CTLCOLOR reflection message to add the handler (this is prefixed in the messages list of the class wizard dialog box with an = (i.e. =WM_CTLCOLOR not the WM_CTLCOLOR.
It took me a little while to figure this out.
Thanks for your help,
Joe