mouse clicks

This is a discussion on mouse clicks within the C Programming forums, part of the General Programming Boards category; I noticed this was posted in a previous thread: Code: SetCursorPos(10, 10); /* Move the cursor to 10, 10 */ ...

  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, 05:52 AM
  2. Replies: 2
    Last Post: 05-31-2006, 07:57 PM
  3. Replies: 6
    Last Post: 07-27-2002, 02:24 AM
  4. Replies: 1
    Last Post: 06-06-2002, 05:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21