Thread: mouse clicks

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    43

    mouse clicks

    I noticed this was posted in a previous thread:

    Code:
    SetCursorPos(10, 10); /* Move the cursor to 10, 10 */
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); /* Left button down. */
    mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); /* Left button up. */
    Can someone tell me does this generate the click at 10,10 relative to the whole screen, or 10,10 relative to the active window?

    If it is not relative to the active window then how could i make it so that it is? Is there a function that gets the top left x and y co-ordinates of the window so that i can adjust the numbers dynamically?

  2. #2
    Registered User
    Join Date
    Dec 2004
    Posts
    43
    OK ignore this thread, I have found the answer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Monitor Mouse Clicks
    By mmarab in forum Windows Programming
    Replies: 10
    Last Post: 09-04-2007, 04:52 AM
  2. Replies: 2
    Last Post: 05-31-2006, 06:57 PM
  3. Replies: 6
    Last Post: 07-27-2002, 01:24 AM
  4. Replies: 1
    Last Post: 06-06-2002, 04:17 PM