带有0x3B代码的Windows消息

在Windows XP中注销时,系统将带有代码0x3B的消息发送到应用程序的主窗口。 它与0x11 WM_QUERYENDSESSION消息一起收到。 这是WndProc传入消息的日志:

Message processing: Id = 0x3B, wParam = -2147483637, lParam = 0, result = 0
Message processing: Id = 0x11, wParam = 0, lParam = -2147483648, result = 0
Form closing event handler. Reason:WindowsShutDown
Message processed: Id = 0x11, wParam = 0, lParam = -2147483648, result = 1
Message processed: Id = 0x3B, wParam = -2147483637, lParam = 0, result = 1
Message processing: Id = 0x3B, wParam = -2147483639, lParam = 0, result = 0
Message processing: Id = 0x16, wParam = 1, lParam = -2147483648, result = 0
Form closed event handler. Reason:WindowsShutDown
Message processing: Id = 0x46, wParam = 0, lParam = 1239312, result = 0
Message processed: Id = 0x46, wParam = 0, lParam = 1239312, result = 0
Message processing: Id = 0x47, wParam = 0, lParam = 1239312, result = 0
Message processed: Id = 0x47, wParam = 0, lParam = 1239312, result = 0
Message processing: Id = 0x86, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x7F, wParam = 2, lParam = 0, result = 0
Message processed: Id = 0x7F, wParam = 2, lParam = 0, result = 852077
Message processing: Id = 0x7F, wParam = 2, lParam = 0, result = 0
Message processed: Id = 0x7F, wParam = 2, lParam = 0, result = 852077
Message processed: Id = 0x86, wParam = 0, lParam = 0, result = 1
Message processing: Id = 0x6, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x6, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x1C, wParam = 0, lParam = 2620, result = 0
Message processed: Id = 0x1C, wParam = 0, lParam = 2620, result = 0
Message processing: Id = 0x8, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x8, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x2, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x2, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x82, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x82, wParam = 0, lParam = 0, result = 0

在注销期间,我的应用程序在Windows XP中存在一个错误。 它不关闭。 原因是:

Message processed: Id = 0x3B, wParam = -2147483637, lParam = 0, result = <b>3</b>

而不是1

任何想法这个消息是什么意思? 为什么它处理不正确?


我的Google-fu显示这是一个未公开的消息 - WM_CLIENTSHUTDOWN。 这可能是有趣的,但它所做的只是将WM_QUERYENDSESSION / WM_ENDSESSION发送到窗口及其子窗口。 返回值3(MCSR_DONOTSHUTDOWN)表示该窗口或其中一个子窗口正在否决该请求。

链接地址: http://www.djcxy.com/p/63599.html

上一篇: Windows message with 0x3B code

下一篇: How to kill an alert window in Windows using C#?