Original Post
This is a simple problem but for some reason it's annoying me...
I have a few static controls on my window, and I've changed the background window colour to a nice pale blue colour... However the background behind the lettering of the text in each static control is still painted in the original colour...
According to the Platform SDK, I have to handle the WM_CTLCOLORSTATIC message, which can be used to set the background colour. So this is what I have:
... but when I do that it redraws the background behind the text as plain white, whatever brush I supposedly paint it with in this snippet of source code. Weird.
Have I missed something?
Thanks,
========
Smidge
========
Edited by - smidge_tech on December 26, 2001 10:24:55 AM
// g_App.GetBckBrush() returns the HBRUSH I'm using.
// rcRect is just a RECT structure.
case WM_CTLCOLORSTATIC:
// A static control is about to be drawn...
GetWindowRect((HWND)lParam, &rcRect);
FillRect((HDC)wParam, &rcRect, g_App.GetBckBrush());
return((LRESULT)g_App.GetBckBrush());
|