Thread: mouse detecting

  1. #1
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125

    mouse detecting

    what is the quickest way to have a program even running in the background detect over the whole computer if the right click is pressed?
    Thanx In Advance
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    SetWindowsHookEx() with a WH_MOUSE setting....

  3. #3
    Registered User Josh Kasten's Avatar
    Join Date
    Jul 2002
    Posts
    109

    Question how do you use SetWindowsHookEx();?

    I can't figerout how the use SetWindowsHookEx();. i got it to work when the mouse is inside my program but it doesn't work when its outside my program. I want it to be a bull to tell if the mouse button was click no matter where the mouse is. here is my program in a .zip with the project files for MVC++ take a look could you tell me what i need to change;
    int a; don't make a program without it.

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793

    Re: how do you use SetWindowsHookEx();?

    Originally posted by Josh Kasten
    I can't figerout how the use SetWindowsHookEx();. i got it to work when the mouse is inside my program but it doesn't work when its outside my program. I want it to be a bull to tell if the mouse button was click no matter where the mouse is. here is my program in a .zip with the project files for MVC++ take a look could you tell me what i need to change;
    SetWindowsHookEx() are easy as long as you know what you are trying to do, how to create dll files and how to communicate between processes

    Here's one I did

  5. #5
    Registered User Josh Kasten's Avatar
    Join Date
    Jul 2002
    Posts
    109

    Smile THANKS!!!!

    Thanks for telling me about the ex. program you made i shell study it well. thanks man
    int a; don't make a program without it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Detecting keyboard and mouse in linux
    By sameer.nalwade in forum C Programming
    Replies: 3
    Last Post: 11-22-2008, 04:24 AM
  2. need Help in Mouse Pointer
    By obaid in forum C++ Programming
    Replies: 3
    Last Post: 12-07-2006, 03:33 AM
  3. Problem in mouse position
    By Arangol in forum Game Programming
    Replies: 6
    Last Post: 08-08-2006, 07:07 AM
  4. Detecting right mouse button
    By abrege in forum C++ Programming
    Replies: 2
    Last Post: 11-24-2002, 09:36 PM
  5. Game Design Topic #2 - Keyboard or Mouse?
    By TechWins in forum Game Programming
    Replies: 4
    Last Post: 10-08-2002, 03:34 PM