鼠标状态Winapi [英] Mouse state winapi

查看:199
本文介绍了鼠标状态Winapi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C ++中,有什么方法可以使用winapi获取鼠标状态(位置,按钮状态)吗? 我不想使用Windows消息(WM_MOUSEMOVE,WM_LBUTTONDOWN等).

Is there any way to get mouse state (position, buttons states) using winapi in C++? I don't want to use windows messages (WM_MOUSEMOVE, WM_LBUTTONDOWN, etc).

谢谢!

推荐答案

听起来您正在寻找 GetKeyState .您使用虚拟密钥代码调用的后者指定感兴趣的鼠标按钮.

It sounds like you are looking for GetCursorInfo and GetKeyState. The latter you call with virtual key codes that specify the mouse button of interest.

这篇关于鼠标状态Winapi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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