MOUSE_EVENT Problem

This is a discussion on MOUSE_EVENT Problem within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to emulate mouse input on an application using DirectX to draw the graphics and the API I have ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    20

    MOUSE_EVENT Problem

    I'm trying to emulate mouse input on an application using DirectX to draw the graphics and the API I have chosen is mouse_event (please don't tell me about SendInput unless it has a direct relation to my issue, I know it superseded by it) and this only seems to move the mouse. (in the incorrect position, I might add) I believe my syntax usage is correct & I've checked with MSDN to be sure but no avail Does anyone know what my issue is? If so, any help would be appreciated.

    Code:

    Code:
    mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, 500, 250, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE, 500, 250, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE, 500, 250, 0, 0);
    Thanks in advance.

  2. #2
    Captain - Lover of the C
    Join Date
    May 2005
    Posts
    341
    You don't need to specify coordinates for the down and up.
    Code:
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
    Don't quote me on that... ...seriously

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

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