Jump to content
  • Advertisement
Sign in to follow this  
flyorfall

Win32 ShowWindow

This topic is 3609 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 have a window with several labels, which are all initially invisible. Performing some operations, I want to show one label per operation as a progress indicator. So each time I need I call: ShowWindow(GetDlgItem(hWndMyDlg, nIDLabel), SW_SHOW); But all I get is the window to get white. How can I refresh my window in a good way? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I put it under the WM_INITDIALOG case within MyDlgProc, but when I put it under the default case I got my window white or not well refreshed. I don't remember if I tried to put it also under the WM_PAINT case. I'll try it. Anything else to suggest?

Share this post


Link to post
Share on other sites
I put it under the WM_INITDIALOG case within MyDlgProc, but when I put it under the default case I got my window white or not well refreshed. I don't remember if I tried to put it also under the WM_PAINT case. I'll try it. Anything else to suggest?

Share this post


Link to post
Share on other sites
Put it after the call to ShowWindow(). You dont have that call in the default case or WM_PAINT, right? (Hint: if you do then you're doing something you really shouldnt be doing)

Share this post


Link to post
Share on other sites
To elaborate, UpdateWindow generates a WM_PAINT message for the target window. Ideally, you should simply send the message to the parent window (dialog box, main window, etc), not child control. Do not call UpdateWindow while handling WM_PAINT!

Share this post


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

  • 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!