CDocument::GetNextView
Visual Studio 2008
Call this function to iterate through all of the document's views.
virtual CView* GetNextView( POSITION& rPosition ) const;
//To get the first view in the list of views: // POSITION pos = GetFirstViewPosition(); // CView* pFirstView = GetNextView(pos); // // This example uses CDocument::GetFirstViewPosition // and GetNextView to repaint each view. // An easier way to accomplish the same result is to call // UpdateAllViews(NULL); void CExampleDoc::OnRepaintAllViews() { POSITION pos = GetFirstViewPosition(); while (pos != NULL) { CView* pView = GetNextView(pos); pView->UpdateWindow(); } }