网站首页  词典首页

请输入您要查询的计算机术语:

 

术语 CDocument::GetNextView
释义 CDocument::GetNextView

virtual CView* GetNextView (POSITION& rPosition) const;

返回值:返回由rPosition标识的视图指针。

参数:
rPositionPOSITION值的一个参考。它是由前一次调用GetNextView和GetFirstViewPosition成员函数返回得到的。其值不能为NULL。

说明:
调用该函数来迭代所有的文档视图。函数通过rPosition返回视图,并将rPosition设置为列表中下一个视图的POSITION值。如果获得的视图是列表中的最后一个,则设置rPosition为NULL。

示例:
// This example uses CDocument::GetFirstViewPosition
// and GetNextView to repaint each view.
void CMyDoc::OnRepaintAllViews()
{
  POSITION pos = GetFirstViewPosition();
  while (pos != NULL)
  {
    CView* pView = GetNextView(pos);
    pView->UpdateWindow();
  }
}
// An easier way to accomplish the same result is to call
// UpdateAllViews(NULL);

请参阅:CDocument::AddNew,CDocument::GetFirstViewPosition,CDocument::RemoveView,CDocument::UpdateAllViews
随便看

 

MFC类库中文详解手册包含4274条MFC类库参考词条,基本涵盖了Microsoft基本类库中的类、全局函数、全局变量和宏的内容,是计算机编程的有利工具。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 12:26:33