Winapi background color

Started by
15 comments, last by stranger4u 21 years, 7 months ago
yep i''m doing

HWND blah =

just didn''t post it because i thought it wasn''t important.. and updatewindow doesn''t help either :-(
Advertisement
Darn. I''ve never had that problem before, at all. All I can suggest is what I suggested before: experiment around with putting your code in a different function, with calling it at different times, or from different locations in the program.
{[JohnE, Chief Architect and Senior Programmer, Twilight Dragon Media{[+++{GCC/MinGW}+++{Code::Blocks IDE}+++{wxWidgets Cross-Platform Native UI Framework}+++
Try using this:

  wndClass.hbrBackground = (HBRUSH)COLOR_WINDOW;  
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
Update the parent BEFORE the children.
That is, call UpdateWindow(hwndParent);
And then call UpdateWindow(GetDlgItem(hwndParent,1));

Or, use WS_CLIPCHILDREN window style on the parent.

EDIT : Got it clearer.

[edited by - Coincoin on August 29, 2002 5:43:41 PM]
Editor42 ...builds worlds
quote:Original post by Coincoin
Call UpdateWindow(CHILD); AFTER UpdateWindow(PARENT);

Or, use WS_CLIPCHILDREN on the parent.


WS_CLIPCHILDREN helped, thanks.
quote:Original post by xDS4Lx
Try using this:

    wndClass.hbrBackground = (HBRUSH)COLOR_WINDOW;    


Shouldn''t it be:
wndClass.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
?


Goblineye Entertainment
The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction
Try it out! It works perfectly that way.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989

This topic is closed to new replies.

Advertisement