Mouse buttons in C++

Andres's Avatar, Join Date: Jul 2008
Go4Expert Member
Is there a way that when you click a mouse button, it can send info to a notepad file. Or even better, a code in C++ that can program a button to do something or receive info from a button in the mouse. Please help.
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
WM_LBUTTONDOWN - see http://msdn.microsoft.com/en-us/library/ms645607.aspx
0
Andres's Avatar, Join Date: Jul 2008
Go4Expert Member
Thanks...is there a page where i can see an example on how to use these codes?
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
If you have a Windows program then just add case WM_LBUTTONDOWN to your main window procedure. But if you're just starting out with Windows programming (as suggested by the fact that you don't know where to put WM_LBUTTONDOWN), you need to check out the Petzold book, that will get you started. Petzold is *THE* Windows programming reference/starter.