在 Windows7 中从安全屏幕(Ctrl+Alt+Del)返回时未收到 WM_PAINT 消息

发布于 2024-08-17 08:39:10 字数 248 浏览 1 评论 0原文

我需要检测安全屏幕的关闭,这是用户在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瀟灑尐姊 2024-08-24 08:39:10

您是否为窗口/会话调用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文