CView::OnInitialUpdate的MSDN译文
2007-06-17 09:32
267 查看
Called by the framework after the view is first attached to the document, but before the view is initially displayed. The default implementation of this function calls the OnUpdate member function with no hint information (that is, using the default values of 0 for the lHint parameter and NULL for the pHint parameter). Override this function to perform any one-time initialization that requires information about the document. For example, if your application has fixed-sized documents, you can use this function to initialize a view’s scrolling limits based on the document size. If your application supports variable-sized documents, use OnUpdate to update the scrolling limits every time the document changes.
[b]virtual void OnInitialUpdate( );[/b]
在框架完全建立后(视类和文档类绑定在一起),但又在视图被显示之前由框架调用。默认操作是调用虚函数OnUpdate ,该函数中的hint信息由系统设置为:lHint=0, pHint=NULL。基于文档的信息重写这个函数完成一次性的初始化工作。例如,你的应用程序是固定大小的文档,你可以利用这个函数设置视图的滚动限制。如果你的程序支持大小可变的文档,就可以在文档每次发生变化的时候通过调用函数OnUpdate来更新滚动限制。
[b]virtual void OnInitialUpdate( );[/b]
在框架完全建立后(视类和文档类绑定在一起),但又在视图被显示之前由框架调用。默认操作是调用虚函数OnUpdate ,该函数中的hint信息由系统设置为:lHint=0, pHint=NULL。基于文档的信息重写这个函数完成一次性的初始化工作。例如,你的应用程序是固定大小的文档,你可以利用这个函数设置视图的滚动限制。如果你的程序支持大小可变的文档,就可以在文档每次发生变化的时候通过调用函数OnUpdate来更新滚动限制。
相关文章推荐
- error C2352: 'CView::OnInitialUpdate' : illegal call of non-static member function
- Oncreate,Oninitialupdate,Oninitdialog
- 关于CFormView不调用OnInitialUpdate的问题
- MFC中的一般经验之谈----OnInitialUpdate
- 在CView类的构造函数,OnCreate,或OnInitialUpDate中进行初始化有何不同?
- OnInitialUpdate(单文档视图中的View类的成员函数)
- OnInitialUpdate函数
- Create OnCreate OnInitialUpdate OnCreateClient 构造函数之间关系
- CXXXView::OnInitialUpdate何时被执行
- PRB: OnInitialUpdate() May Be Called More Than Once
- 视图中的OnCreate和OnInitialUpDate进行初始化有何不同?
- MFC中OnInitialUpdate问题
- 初学vc8-视图中的OnCreate和OnInitialUpDate进行初始化有何不同?
- OnInitialUpdate 方法
- Create OnCreate OnInitialUpdate OnCreateClient 构造函数之间关系
- OnInitialUpdate
- Create OnCreate OnInitialUpdate OnCreateClient 构造函数之间关系
- 视图中的OnCreate和OnInitialUpDate进行初始化有何不同?
- OnInitialUpdate 详解
- MFC几个常用函数:OnCreate和OnInitialUpDate,GetActiveFrame和MDIGetActive,Invalidate、SetModifiedFlage、UpdateAll