OnInitialUpadate()可能被多次调用,今天中招了
来源:互联网 发布:天猫实时数据 编辑:程序博客网 时间:2024/05/16 14:03
PRB: OnInitialUpdate() May Be Called More Than Once
View products that this article applies to.
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.
CView对象的OnInitialUpdate()函数在SDI视图应用程序中可能被多次调用。当视图窗口被创建的时候任何只需要做一次的初始化工作应该被移到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()函数都会被调用一次。
- OnInitialUpadate()可能被多次调用,今天中招了
- 中招了
- 今天我的阿里云服务器中招了
- 为什么Android的Adapter中,bindview被调用了多次
- 【Android】Android的Adapter中,bindview被调用了多次
- viewDidLoad 和 loadView 的区别,并且viewDidLoad可能被调用两次(或者多次)
- 中招了,答题...
- 中招很久了
- 网站中招了?
- 纯小白系列(二):今天你中招了吗?对移动小小马的简单追踪
- 今天晚上可能要通宵了!呵呵!
- 今天晚上可能要通宵了!呵呵!
- App 被拒绝的理由,你中招了么!!!
- 我的QQ中招了
- 中招
- 今天可能中了病毒——WinUDP
- 今天,美团程序员的年终奖金可能没了
- 今天,美团程序员的年终奖金可能没了
- 燃烧的远征java(二)-开发环境:eclipse 中tomcat无法启动
- MD5加密技术
- 英文写作之经典句型(带例句)
- mplayer在ARM9(s3c2410)上的移植
- 贪吃蛇游戏
- OnInitialUpadate()可能被多次调用,今天中招了
- 燃烧的远征java(二)-开发环境:Eclipse插件系列——SQLExplorer插件的安装和使用
- .NET框架垃圾回收机制
- ASP.NET中上传文件到数据库
- ASP.NET中上传文件到数据库
- Direct3D学习(五):基于高度图的地形生成
- 牛!居然通过了流程规范考试!太高兴了!呵呵
- Windows XP and Windows Update Version 5
- 在VS2005 环境下面使用.NET Framework 1.1 进行编译