Sdílet prostřednictvím


CDocument::GetFirstViewPosition

Volání této funkce můžete získat pozici první zobrazení v seznamu zobrazení přidružené k dokumentu.

virtual POSITION GetFirstViewPosition( ) const;

Vrácená hodnota

A pozice hodnotu, kterou lze použít pro iteraci s GetNextView členské funkce.

Příklad

//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();
   }   
}

Požadavky

Záhlaví: afxwin.h

Viz také

Referenční dokumentace

Třída CDocument

Diagram hierarchie

CDocument::GetNextView