I have some static text on a window which is black, and I would like to change it at runtime using a Colour Chooser dialog. I have successfully obtained the colour, now I just n
A few suggestions:
Are you aware that it's the parent dialog that receives WM_CTLCOLORSTATIC
, not the control itself?
The return (BOOL)...
looks weird - in which function does this code live? You should be returning an LRESULT from your window proc.
You're leaking a brush every time - you should maintain a single brush and return that brush each time. Windows doesn't clean up the brush.