Mouse moving

This is a discussion on Mouse moving within the Windows Programming forums, part of the Platform Specific Boards category; Hello I'm wondering if you could help me with something...i want to move the mouse in Windows from my code(to ...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    1

    Angry Mouse moving

    Hello
    I'm wondering if you could help me with something...i want to move the mouse in Windows from my code(to set it at specific coordinates and move it along the screen, even to click form my code) what should i use...could you explain a little for me ??
    Thank you.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    SetCursorPos will move the cursor to where you want to.

    For left-button click events, handle the following messages in your window procedure:
    WM_LBUTTONDOWN
    WM_LBUTTONBDLCLICK
    WM_LBUTTONUP

    For middle-button click events handle the following messages in your window procedure:
    WM_MBUTTONDOWN
    WM_MBUTTONDBLCLICK
    WM_MBUTTONUP

    For right-button click events handle the following messages in your window procedure:
    WM_RBUTTONCLICK
    WM_RBUTTONDBLCLICK
    WM_RBUTTONUP

    For mouse movement, handle the WM_MOUSEMOVE message.

    There's others; for the full list/explanation of mouse input, read it up on msdn: mouse input overview.

    For cursors there's the cursors overview.
    Last edited by Ken Fitlike; 08-28-2003 at 06:48 AM.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Moving objects with mouse in 3D.
    By psychopath in forum Game Programming
    Replies: 15
    Last Post: 07-10-2011, 05:20 PM
  2. Moving mouse
    By Bill83 in forum Windows Programming
    Replies: 1
    Last Post: 04-02-2006, 09:58 AM
  3. mouse click coords and moving a rect
    By techrolla in forum Windows Programming
    Replies: 1
    Last Post: 03-07-2004, 09:49 PM
  4. Moving a Static box with the mouse
    By AtomRiot in forum Windows Programming
    Replies: 4
    Last Post: 06-27-2003, 12:34 AM
  5. Moving Mouse Pointer
    By loobian in forum Windows Programming
    Replies: 8
    Last Post: 10-16-2001, 04:45 PM

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