拦截 WM_PAINT 消息并据此采取行动

发布于 2024-09-09 00:26:29 字数 225 浏览 3 评论 0原文

我正在尝试用 C++ 拦截/挂钩桌面的 WM_PAINT 消息。我目前正在使用桌面手柄进行绘图,唯一的问题是我不同步,因此它可能会闪烁。

我基本上想要的是一个可以检查 UINT 消息的 WM_PAINT 的语句。 既然这样,我就想做点别的事情。

我要以一种懒惰的方式问它,有没有人把这个放在一小段代码中?获取桌面句柄是通过 GetDesktopWindow() 完成的;由此我也想检查 WM_PAINT。

I'm trying to intercept/hook the WM_PAINT message of the desktop in C++. I'm currently drawing with the desktop handle, my only problem is that I'm not in sync so it might flicker.

What I basically would like is a statement where I can check on the WM_PAINT of UINT message.
When this is the case, I want to do something else.

I'm going to ask it the lazy way, does anyone have this laying around in a small piece of code? Obtaining the desktop handle is done with GetDesktopWindow(); from this I want too check for WM_PAINT.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

苦笑流年记忆 2024-09-16 00:26:29

我会检查 SetWindowHookEx (请参阅: SetWindowsHookEx in C#

I'd check SetWindowHookEx (see: SetWindowsHookEx in C# )

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