Sunday, August 2, 2009

How do you force a CDialog (Visual Studio 2005) object to refresh it's display?

Under one of my OnBnClicked functions, I have to have a sleep timer. Only problem is, the sleep is causing the display not to update. I need it to update once per loop before it sleeps. Is there a function standard in c/c++ that forces the CDialog display(the whole display or the CEdit box in question) to update?

How do you force a CDialog (Visual Studio 2005) object to refresh it's display?
CWnd::Invalidate();


CWnd::UpdateWindow();





since CDialog is derived from CWnd





CDialog::Invalidate ();


CDialog::UpdateWindow();
Reply:If you do you sleep timer right, it shouldn't block refreshes, and runs in a separate thread. How are you doing your timer?


No comments:

Post a Comment