Udostępnij za pośrednictwem


CDocument::GetFirstViewPosition

Wywołanie tej funkcji, aby uzyskać położenie pierwszy widok na liście Widoki skojarzone z dokumentem.

virtual POSITION GetFirstViewPosition( ) const;

Wartość zwracana

A stanowisko wartość używany w iteracji z GetNextView funkcji składowej.

Przykład

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

Wymagania

Nagłówek: afxwin.h

Zobacz też

Informacje

Klasa CDocument

Diagram hierarchii

CDocument::GetNextView