Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Windows 桌面上渲染图形。有很多用于渲染透明和点击窗口的解决方案。但是,我希望一些渲染的精灵是可点击的。我该怎么做呢?
我在 Windows 上使用 C#,并计划使用 OpenTK。如果这是不可行的,请解释。
如果您希望它在半透明区域中工作,则没有“干净”的解决方案。通常的解决方案是确定哪个窗口位于点击位置的正下方,并向其发送合成点击事件消息。
如果你感兴趣的只是给你的窗口一个实心的形状,你可以使用 XShape(在 X11 上)扩展或使用SetWindowRgn从窗口的“敏感”区域切出,点击实际上会“穿透”到什么下面。
SetWindowRgn