Advertisement Jump to content
Sign in to follow this  

win32 - Redraw

This topic is 4965 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

Hi, I'm trying to redraw a window from another thread, and it doesn't seem to be working. I have a dialoge box with a progress bar in it, and a background thread doing some grunt work. I want to update the progress bar, and an edit box, but the window never seems to redraw. I've tried:
	ShowWindow(g_progress_hWnd, SW_SHOW); 
none of which seem to have any effect... I've checked that g_progress_hWnd is correct, and put a printf in WM_PAINT - nothing seems to ever happen.. Any advice would be appreciated. Thanks.

Share this post

Link to post
Share on other sites
Use the InvalidateRect(window handler, null, true) for redrawing the window you want.
UpdateWindow sends an WM_PAINT but if there is nothing to update nothing will be changed in the window, InvalidateRect tells the API which area in the client window needs to be updated(null for entire window). Check the SDK for more info.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!