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


VC .NET MFC Update CVIew

Recommended Posts

soconne    105
I have a MFC SDI Application in Visual C++ .NET. I have my CWinApp, CDocument, and CView classes. For the CView class, I overloaded the OnDraw and OnUpdate functions so that OnUpdate calls OnDraw. For CWinApp, I overloaded the OnIdle function. What I want to do is make the CWinApp::OnIdle function force the CView class to call its OnDraw function every frame. How do I go about doing this? I''ve tried calling GetMainWnd()->Invalidate(false); I''ve even tried calling GetNextDocTemplate and then with that call variable make the CDocument class update the views. But none of these methods work. All I want to do is cause the CWinApp OnIdle function to force every view to call their OnDraw functions each frame. Any ideas??

Share this post

Link to post
Share on other sites