I just started doing some MFC programming and have been using the MFC appwizard for starters and this is my first MDI app
I am trying to redraw the entire screen ...... is there a function which can clear out the entire view ... that means wipe everything that is shown on the screen ....
The call to Invalidate doesn't quite call OnDraw. The invalidate messages are put onto a queue for latter processing and your OnDraw will return before they are processed.
To update the screen, however, you want to use the methods defined in the CDC* pDC passed into the OnDraw method. Something like
Code:
COLORREF color = RGB(100, 100, 100);
CBrush brush(color);
CRect clientRect;
GetClientRect(&clientRect);
pDC->FillRect(&clientRect, &brush);
ought to work.