http://bugs.winehq.org/show_bug.cgi?id=14879
--- Comment #6 from Matt Jervis polesapart@gmail.com 2008-08-23 04:59:23 --- As Vincent mentions the WM_CTLCOLORSTATIC message should be send when the control is about to be drawn. However, looking at the wine code, the dialog code seems to send WM_CTLCOLORSTATIC unconditionally upon receiving a WM_SETTEXT message (~line 397 of user32/button.c).
It is interesting to note that calling WM_SETTEXT on a groupbox control when the application recieves the WM_INITDIALOG message (ie before it has been shown) results in no WM_CTLCOLORSTATIC notification under windows (but does under wine). The WM_CTLCOLORSTATIC message is sent after WM_PAINT on windows and wine.
Unfortunately I'm trying to debug this in my spare time (which isn't much) so thats why my posts here have been a bit sporadic.