Is there a function I can call to obtain the up/down status of all mouse buttons at the time of the function call?
I'm attempting to use Win32 as a replacement of DirectInput, since DI will go bye bye soon.
Printable View
Is there a function I can call to obtain the up/down status of all mouse buttons at the time of the function call?
I'm attempting to use Win32 as a replacement of DirectInput, since DI will go bye bye soon.
GetAsyncKeyState() will work for mouse buttons as well as keys on the keyboard. Use the constants VK_LBUTTON, VK_RBUTTON, and VK_MBUTTON. See the bit on the MSDN page linked above under "Remarks" regarding the difference between physical and logical mouse buttons.
::GetAsyncKeyState(..) with VK_LBUTTON or VK_RBUTTON
for
/EDIT Smasher/Devourer was faster :D
Cheers
Thanks guys, you're extremely helpful.
I've rated both of you. Keep up the great work!