为什么鼠标在 DISCL_EXCLUSIVE 中消失了 | DISCL_FOREGROUND 模式?
使用DirectInput时,为什么使用DISCL_EXCLUSIVE时鼠标光标完全消失 | DISCL_FOREGROUND 作为您的合作级别?
mouse->SetCooperativeLevel ( hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND ) ;
尽管 DirectInput 已被弃用,但鼠标在 WINDOWS 上不可用这一事实是否意味着您在使用 DirectInput(相对于 RAWINPUT)时响应速度稍快一些且效果更好?
When using DirectInput, why does the mouse cursor completely disappear when you use DISCL_EXCLUSIVE | DISCL_FOREGROUND as your cooperative level?
mouse->SetCooperativeLevel ( hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND ) ;
Even though DirectInput is deprecated, does the very fact the mouse is not even available to WINDOWS mean that you're slightly more responsive and better when using DirectInput (vs RAWINPUT)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我打开这个问题时,我没有意识到 DISCL_EXCLUSIVE | DirectInput 中的 DISCL_FOREGROUND 设置实际上相当于
RIDEV_CAPTUREMOUSE | RIDEV_NOLEGACY 表示 RAWINPUT 中的鼠标。您只需调用
ShowCursor( FALSE );
即可隐藏光标。At the time I opened this question I didn't realize that
DISCL_EXCLUSIVE | DISCL_FOREGROUND
setting in DirectInput really amounts toRIDEV_CAPTUREMOUSE | RIDEV_NOLEGACY
for the mouse in RAWINPUT. You can simply callShowCursor( FALSE );
to hide the cursor then.