CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: mouse click

  1. #1
    Guest

    mouse click

    Hi,
    I want to hook every mouse l-click...
    I'm using MS-VC++ 5.0. (MFC)
    Please, help me.

    Thanks!


  2. #2
    Join Date
    Jul 1999
    Posts
    15

    Re: mouse click

    Let's assume you have created the application skeleton using classwizard and your project is loaded in workspace.

    Run classwizard by typing CTRL-W.

    Switch to the leftmost tab "Message Maps"

    In the "Class name" combobox, select the window class for which you want to capture the click.

    In the "Object IDs" listview, scroll to the bottom line, there will be name of the class you have selected in the combobox. Select it.

    In the "messages" listview click on the message WM_LBUTTONDOWN.

    Click on the button "Add function", then click on "Edit code". You will be transfered into function which will be called everytime the user click the left mouse button over your window. Place your code there.

    Peter.



  3. #3
    Guest

    Re: mouse click

    I need it for all windows: a system hook...


  4. #4
    Join Date
    Apr 1999
    Location
    Malaysia
    Posts
    224

    Re: mouse click

    then just type "hooks" or "hook" in codeguru search section, you get what you want

    Hello World!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured