第5 章: Windows Message Mapping 2008-01-11 09:04 207人阅读 评论(0) 收藏
第5 章: Windows Message Mapping
いち.消息流程
◙ WM_CREATE
first message to a view . use ONCreate 无法截获. 在 OnInitalUpdate可以使用, but this function maybe use more than one time .
◙ WM_CLOSE
OnClose to close the window, use CDocument::SaveModified for safe.
◙ WM_QUERYENDSESSION
It is sure that many programs are running when you want to close the windows. So, these session must be end before the windows are closed .
And then , using WM_QUERYENDSESSION in OnQueryEndSession function.
◙ WM_DESTROY
WM_DESTROY after WM_CLOSE .->OnDestroy.
the view is visable but it and its child are still active.
-> call base OnDestroy.
◙ WM_NCDESTROY
last message before window destroyed.
child has been destroyed .
->OnNCDestroy ->base OnNCDestroy.
The 动态 view use PostNCDestroy.
版权声明:本文为博主原创文章,未经博主允许不得转载。
posted on 2008-01-11 09:04 Joyfulmath 阅读(106) 评论(0) 编辑 收藏 举报
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步