CDocument::GetNextView

 

모든 문서 보기를 반복 하려면이 함수를 호출 합니다.

구문

      virtual CView* GetNextView(
   POSITION& rPosition 
) const;

매개 변수

  • rPosition
    참조 하는 위치 이전 호출에 의해 반환 되는 값은 GetNextView 또는 GetFirstViewPosition 멤버 함수. 이 값이 되지 않아야 NULL.

반환 값

보기를 식별 하는 포인터 rPosition.

설명

함수 식별 하는 뷰를 반환 합니다. rPosition 다음 설정 rPosition위치 값을 다음 보기 목록에서. 검색된 보기 목록에서 마지막 고 지 rPosition 설정 NULL.

예제

//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 Class
계층 구조 차트
CDocument::AddView
CDocument::GetFirstViewPosition
CDocument::RemoveView
CDocument::UpdateAllViews