使用 IDirect3DDevice9::SetCursorProperties 时光标在非客户区域闪烁
我有一个在 Direct3D9 下运行的应用程序。应用程序使用 Direct3D HW 光标 API(IDirect3DDevice9::SetCursorProperties
等)来控制光标。几乎一切工作正常:
- 当在应用程序窗口内部时,显示由 SetCursorProperties 指定的光标;
- 当在应用程序窗口外部时,根据桌面或其他窗口的需要显示正常操作系统光标
问题出在我的窗口的非客户区域(标题栏、屏幕边缘)。在非客户区移动时,会短暂显示该区域功能对应的光标,但一旦停止移动,又会再次显示SetCursorProperties中设置的光标。
使用 IDirect3DDevice9::SetCursorProperties
以便我在窗口非客户端区域获得默认操作系统光标的正确方法是什么?
I have an application running under Direct3D9. The application is using the Direct3D HW cursor API (IDirect3DDevice9::SetCursorProperties
et al.) to control the cursor. Almost everything works fine:
- when inside of the application window, the cursor specified by SetCursorProperties is shown
- when outside of the application window, normal OS cursor is displayed as needed by desktop or other windows
The problem is with the non-client area of my window (the title bar, screen edges). When moving in the non-client area, the cursor corresponding to the function of the area is breifly shown, but once I stop moving, the cursor set in SetCursorProperties is shown again.
What is the correct way to use IDirect3DDevice9::SetCursorProperties
so that I get the default OS cursors on my window non-client area?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过各种尝试后,应用程序中的以下更改为我解决了这个问题:
WM_SETCURSOR
时,记住条件(lParam&0xffff )==HTCLIENT
在全局变量CursorInClient
中CursorInClient
为 false 时,避免调用IDirect3DDevice9::ShowCursor
After experimenting with various things, a following change in the application has solved the issue for me:
WM_SETCURSOR
is received, remember a result of a condition(lParam&0xffff)==HTCLIENT
in a global variableCursorInClient
CursorInClient
is false, avoid callingIDirect3DDevice9::ShowCursor