主页 / 库函数目录 / 键盘鼠标输入 / mouse_msg 结构体
功能:
这个结构体用于保存鼠标消息
声明:
typedef struct mouse_msg {
UINT msg;
INT x;
INT y;
UINT flags;
INT wheel;
}mouse_msg;
成员:
x
当前鼠标 x 坐标
y
当前鼠标 y 坐标
is_move()
是否鼠标移动消息,类型为bool
is_down()
是否鼠标按键按下消息,类型为bool
is_up()
是否鼠标按键放开消息,类型为bool
is_left()
是否鼠标左键消息,类型为bool
is_mid()
是否鼠标中键消息,类型为bool
is_right()
是否鼠标右键消息,类型为bool
is_wheel()
是否鼠标滚轮滚动消息,类型为bool
wheel
鼠标滚轮滚动值,一般情况下为 120 的倍数或者约数。
msg
不建议直接访问
flags
不建议直接访问
示例:
参见入门基础示例15