PRB: OnInitialUpdate() May Be Called More Than Once
来源:互联网 发布:淘宝买家秀兼职骗局 编辑:程序博客网 时间:2024/05/01 00:08
Article ID | : | 103982 |
Last Review | : | November 21, 2006 |
Revision | : | 2.1 |
This article was previously published under Q103982
SYMPTOMS
The OnInitialUpdate() function of a CView object in a single document interface (SDI) application may be called more than once. Any initialization that needs to be done only when the view's window is created should be done in the OnCreate() message handler instead of in the OnInitialUpdate() function.
在SDI视图应用程序中,CView对象的OnInitialUpdate()函数可能被多次调用。当视图窗口被创建的时候,任何只需要做一次的初始化工作应该被移到OnCreate()中执行,不是在OnInitialUpdate()中执行。
MORE INFORMATION
In an SDI application, a single CView object is created to display a view of the document. When the user changes the document, the data in the CDocument is cleared using CDocument::DeleteContents(), and data for the new document is read into the CDocument object. Then the view is updated by sending a WM_INITIALUPDATE message to the view's window, which calls the OnInitialUpdate() function. Therefore, every time the user changes documents, the OnInitialUpdate() function for the view is called.
在一个SDI应用中,单个的CView对象被创建用来显示一个document的视图。当用户切换document的时候,在CDocument中储存的数据被函数CDocument::DeleteContents()清空,新document的数据被加载到CDocument对象中。然后,通过发送一个WM_INITIALUPDATE 消息,使得视图被更新,这个时候会调用 OnInitialUpdate()函数。因此,每一次,用户切换document, OnInitialUpdate()函数都会被调用一次。
- PRB: OnInitialUpdate() May Be Called More Than Once
- WKWebview崩溃问题Completion handler passed to was called more than once
- appears more than once in the keychain The codesign tool requires there only be one
- The interface EntityDao cannot be implemented more than once with different arguments: EntityDao<Sit
- 关于IAR报 more than one storage class may not be specified 错误的问题
- Error: Finish can only be called once
- BulkWrite objects may only be executed once
- Column specified more than once in the INSERT list.
- 解决“certificateidentity 'iphone distribution' appears more than once”错误
- 解决“certificateidentity 'iphone distribution' appears more than once”错误
- error "flag 'tab_complete_word' was defined more than once caffe
- 'block' tag with name 'content' appears more than once
- There Can Be More Than One
- gthread-error ** gthread system may only be initialized once. aborting
- FWK005 parse may not be called while parsing
- FWK005 parse may not be called while parsing
- Warning: Problems in Mirror May Be Larger Than They Appear
- SGA_MAX_SIZE cannot be set to more than MEMORY_TARGET
- opengl/glut的若干函数
- C#开发的程序如何在运行的时候弹出选择调试器的代码
- 数据挖掘算法
- vb6托盘右键菜单
- cvirus.c病毒源代码(只是用与研究!请误乱用!)
- PRB: OnInitialUpdate() May Be Called More Than Once
- 如何用vb6建立带光栅的菜单
- fcntl函数
- 遥仰凰华重装系统后无法运行解决方法
- GMT笔记
- 读毛泽东思想有感
- 状态防火墙 & 深度检测防火墙
- setsockopt
- 纯真IP数据库格式详解