WS_EX_TRANSPARENT 和手写笔事件 [英] WS_EX_TRANSPARENT and stylus events

查看:82
本文介绍了WS_EX_TRANSPARENT 和手写笔事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码在窗口中设置 WS_EX_TRANSPARENT 标志:

I'm setting WS_EX_TRANSPARENT flag in window with the following code:

SetWindowLong( hwnd, GWL_EXSTYLE,WS_EX_TRANSPARENT | WS_EX_COMPOSITED | WS_EX_LAYERED );

此标志使鼠标事件转到 Windows 系统而不是我的应用程序.当我设置这个时,我无法在 hwnd 窗口中获取 Stylus 事件.有没有办法解决这个问题,或者那是不可能的?

This flag make that mouse events go to windows system instead of my app. When I set this, I can't get Stylus events in hwnd window. Any way to solve that or that's not possible?

推荐答案

WS_EX_TRANSPARENT 扩展窗口样式的行为 分层窗口 已记录:

The behavior for the WS_EX_TRANSPARENT extended window style for Layered Windows is documented:

[I]如果分层窗口具有WS_EX_TRANSPARENT扩展窗口样式,则分层窗口的形状将被忽略,鼠标事件将传递给分层窗口下方的其他窗口.>

[I]f the layered window has the WS_EX_TRANSPARENT extended window style, the shape of the layered window will be ignored and the mouse events will be passed to other windows underneath the layered window.

注意:对于所有指针设备,输入处理的规则通常是相同的.每当您阅读鼠标事件"时,您都可以将其扩展为来自指点设备的输入事件".

Note: The rules for input handling are usually the same, for all pointing devices. Whenever you read "mouse events" you can expand that to "input events from a pointing device".

WS_EX_TRANSPARENT:

要在没有这些限制的情况下实现透明度,请使用 SetWindowRgn 函数.

To achieve transparency without these restrictions, use the SetWindowRgn function.

这篇关于WS_EX_TRANSPARENT 和手写笔事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆