在 Windows7 中从安全屏幕(Ctrl+Alt+Del)返回时未收到 WM_PAINT 消息
我需要检测安全屏幕的关闭,这是用户在Windows下按Ctrl+Alt+Del时出现的全屏。 在 Xp 中,当屏幕关闭时,我的应用程序会收到一条 wm_paint 消息,但在 Windows 7 下,并不总是收到消息,也许只有 25% 的时间。
我尝试捕获 WM_WTSSESSION_CHANGE 消息,但只有当用户注销然后重新登录到他们的帐户时我才会收到此消息。
不确定 Vista 中的行为,因为到目前为止我只在 XP 和 7 上进行了测试。
I need to detect the closing of the security screen, this is the full screen that appears when a user presses Ctrl+Alt+Del under windows.
In Xp my application receives an wm_paint message when this screen is closed but under windows 7, a message is not always received, maybe only 25% of the time.
I tried catching the the WM_WTSSESSION_CHANGE message instead but I only receive this message if the user log outs then logs back into their account.
Not sure on the behaviour in Vista as I have only tested this on XP and 7 so far.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否为窗口/会话调用 WTSRegisterSessionNotification() 来接收 WM_WTSSESSION_CHANGE 的子类型(wParam)(WTS_CONSOLE_CONNECT、WTS_CONSOLE_DISCONNECT、WTS_SESSION_LOCK、WTS_SESSION_UNLOCK)?一个简单的 win32 示例位于 http://support.microsoft.com/kb/310153
看来 WTS_SESSION_UNLOCK 应该是你所追求的。
Did you call WTSRegisterSessionNotification() for the window/session to receive the subtypes (wParam) of WM_WTSSESSION_CHANGE (WTS_CONSOLE_CONNECT, WTS_CONSOLE_DISCONNECT, WTS_SESSION_LOCK, WTS_SESSION_UNLOCK)? A plain win32 example is at http://support.microsoft.com/kb/310153
It seems WTS_SESSION_UNLOCK should be what you're after.