Mouse buttons in C++

Discussion in 'C++' started by Andres, Aug 11, 2008.

  1. Andres

    Andres New Member

    Joined:
    Jul 22, 2008
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
  3. Andres

    Andres New Member

    Joined:
    Jul 22, 2008
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    0
    Thanks...is there a page where i can see an example on how to use these codes?
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice