Reputation: 33890
I need something like GetKeyboardState()
but for mouse. I do not need to handle an event when the mouse button pressed, just need to know if the buttons are up or down at some moment. This is for toy animation program.
Upvotes: 1
Views: 79
Reputation: 37122
if (GetAsyncKeyState(VK_LBUTTON) < 0)
{
// left button is down
}
if (GetAsyncKeyState(VK_RBUTTON) < 0)
{
// right button is down
}
Upvotes: 3