标签: winapi
我需要像GetKeyboardState()这样的东西,但对于鼠标。按下鼠标按钮时我不需要处理事件,只需要知道按钮在某个时刻是上升还是下降。这是玩具动画节目。
GetKeyboardState()
答案 0 :(得分:3)
if (GetAsyncKeyState(VK_LBUTTON) < 0) { // left button is down } if (GetAsyncKeyState(VK_RBUTTON) < 0) { // right button is down }