窗口打开关闭发生的消息顺序(Windows API)
(创建时间:2012年08月15日 00:13:00)
Jangogo : 

Windows Message Sequence when Initialize window or Close window / 窗口打开关闭发生的消息顺序Windows API

PreCreateWindow!
[2010-05-24 23:35:38]WM_GETMINMAXINFO->36     // 最大值 最小值信息     // CreateWindow函数触发了这四个消息
[2010-05-24 23:35:38]WM_NCCREATE->129        // 非客户区创建
[2010-05-24 23:35:38]WM_NCCALCSIZE->131       // 非客户区计算尺寸
[2010-05-24 23:35:38]WM_CREATE->1          // 窗口创建
AfterCreateWindow!
[2010-05-24 23:35:38]WM_SHOWWINDOW->24    // ShowWindow函数触发了以下的消息
[2010-05-24 23:35:38]WM_WINDOWPOSCHANGING->70
[2010-05-24 23:35:38]WM_WINDOWPOSCHANGING->70
[2010-05-24 23:35:38]WM_ACTIVATEAPP->28
[2010-05-24 23:35:38]WM_NCACTIVATE->134
[2010-05-24 23:35:38]WM_GETTEXT->13
[2010-05-24 23:35:38]WM_ACTIVATE->6
[2010-05-24 23:35:38]WM_IME_SETCONTEXT->641
[2010-05-24 23:35:38]WM_IME_NOTIFY->642
[2010-05-24 23:35:38]WM_SETFOCUS->7
[2010-05-24 23:35:38]WM_NCPAINT->133
[2010-05-24 23:35:38]WM_GETTEXT->13
[2010-05-24 23:35:38]WM_ERASEBKGND->20
[2010-05-24 23:35:38]WM_WINDOWPOSCHANGED->71
[2010-05-24 23:35:38]WM_SIZE->5
[2010-05-24 23:35:38]WM_MOVE->3
AfterShowWindow!
[2010-05-24 23:35:38]WM_PAINT->15                          // UpdateWindow函数触发的消息
AfterUpdateWindow!
[2010-05-24 23:35:38]WM_SYNCPAINT->136
[2010-05-24 23:35:38]WM_GETICON->127
[2010-05-24 23:35:38]WM_GETICON->127
[2010-05-24 23:35:38]WM_GETICON->127
[2010-05-24 23:35:38]WM_NCHITTEST->132
[2010-05-24 23:35:38]WM_SETCURSOR->32
[2010-05-24 23:35:38]WM_MOUSEFIRST->512
[2010-05-24 23:35:38]WM_NCHITTEST->132
[2010-05-24 23:35:38]WM_SETCURSOR->32
[2010-05-24 23:35:38]WM_MOUSEFIRST->512
[2010-05-24 23:35:52]WM_NCHITTEST->132
[2010-05-24 23:35:52]WM_SETCURSOR->32
[2010-05-24 23:35:52]WM_NCMOUSEMOVE->160


[2010-05-24 23:35:58]WM_NCHITTEST->132// 以下为关闭窗口发送的消息
[2010-05-24 23:35:58]WM_SETCURSOR->32
[2010-05-24 23:35:58]WM_NCLBUTTONDOWN->161
[2010-05-24 23:35:58]WM_CAPTURECHANGED->533
[2010-05-24 23:35:58]WM_SYSCOMMAND->274
[2010-05-24 23:35:58]WM_CLOSE->16
[2010-05-24 23:35:58]WM_WINDOWPOSCHANGING->70
[2010-05-24 23:35:58]WM_WINDOWPOSCHANGED->71
[2010-05-24 23:35:58]WM_NCACTIVATE->134
[2010-05-24 23:35:58]WM_ACTIVATE->6
[2010-05-24 23:35:58]WM_ACTIVATEAPP->28
[2010-05-24 23:35:58]WM_KILLFOCUS->8
[2010-05-24 23:35:58]WM_IME_SETCONTEXT->641
[2010-05-24 23:35:58]WM_IME_NOTIFY->642
[2010-05-24 23:35:58]WM_DESTROY->2
[2010-05-24 23:35:58]WM_NCDESTROY->130

文档中心