Get Mouse Click

Posts 1–5 of 5 · Page 1 of 1
Get Mouse Click
I want to do this:

If right mouse button is clicked do:
cout << "something...."
i know in vb6 its (vbkeyRbutton),but i dont know c++,try it or search google
I use DirectX DirectInput.dll for that (probably not the best way but who cares). You need the whole DirectX SDK for that though.
while ( 1 == 1 )
{

if (GetAsyncKeyState(0x02))
{
cout<< "Right mouse button!!!";

}

}
Quote Originally Posted by boom.. View Post
while ( 1 == 1 )
{

if (GetAsyncKeyState(0x02))
{
cout<< "Right mouse button!!!";

}

}
Do you always use that while loop?
While (true) { ... } is better.
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?