Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TheAIDSVirus

Updating static controls in C++

This topic is 5593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m running into a strange problem with my Windows static controls in C++. I set the background color, but it doesn''t change unless I call some function that updates the control, such as SetWindowText(). I''ve tried using SetWindowPos() with nothing set but SWP_FRAMECHANGED, and that doesn''t seem to work, even though it works on other controls and windows. Is there a function that is designed to redraw controls, or do I have to use this makeshift approach? ---- AIDS

Share this post


Link to post
Share on other sites
Advertisement
Call

UpdateWindow(hWnd);


This forces an update. It should be called anytime there is a modification to a owner drawen object. If its on another thread you must use the SendThreadMessage(); with a command WM_SHOW or something that will force an window redraw. But of coarse if you just put a WM_PAINT message in the WINProc it also should do the same thing. ?!?!?(Very slow option).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!