Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Mouse buttons in C++ (http://www.go4expert.com/forums/mouse-buttons-cpp-t12864/)

Andres 12Aug2008 00:24

Mouse buttons in C++
 
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.

xpi0t0s 12Aug2008 12:37

Re: Mouse buttons in C++
 
WM_LBUTTONDOWN - see http://msdn.microsoft.com/en-us/library/ms645607.aspx

Andres 12Aug2008 20:58

Re: Mouse buttons in C++
 
Thanks...is there a page where i can see an example on how to use these codes?

xpi0t0s 13Aug2008 12:42

Re: Mouse buttons in C++
 
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.


All times are GMT +5.5. The time now is 19:24.