Compartilhar via


CDocument::GetFirstViewPosition

Chamar essa função para obter a posição da primeira exibição na lista de visualizações associadas com o documento.

virtual POSITION GetFirstViewPosition( ) const;

Valor de retorno

Um valor de POSIÇÃO que pode ser usado para a interação com a função de membro de GetNextView .

Exemplo

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

Requisitos

Cabeçalho: afxwin.h

Consulte também

Referência

Classe de CDocument

Gráfico de hierarquia

CDocument::GetNextView