11-30-2002, 11:08 AM
How can I change the color of the background of a dialog in VC++?
Note: I'm using windows XP & ME.
You have to capture some WM_CTLCOLOR* messages:
The SetBkColor sets the background (here RED) of your static text, if you don't have any, you don't have to use it.
the return value is a handel to a brush (casted to BOOL) for a brush that we created. this will give a nice blue background
for a bit more info on WM_CTLCOLORDLG (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/dialogboxes/dialogboxreference/dialogboxmessages/wm_ctlcolordlg.asp) from msdn
If an application processes this message, it must return a handle to a brush. The system uses the brush to paint the background of the dialog box.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.