다음을 통해 공유


CDocument::GetFirstViewPosition

문서와 연결 된 보기의 목록에서 첫 번째 보기의 위치를 가져오려면이 함수를 호출 합니다.

virtual POSITION GetFirstViewPosition( ) const;

반환 값

A 위치 반복에 사용할 수 있는 값은 GetNextView 멤버 함수입니다.

예제

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

요구 사항

헤더: afxwin.h

참고 항목

참조

CDocument 클래스

계층 구조 차트

CDocument::GetNextView