Thread: Mouse move direction

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Mouse move direction

    Is there a function that I can use to sense if the mouse has been moved up or down or right or left?
    Thanks, August.

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    In a window, you'd just shove some code into the WM_MOUSEMOVE message to compare the current coordinates against previous ones stored in a global. Do some subtraction, get your result. Rinse and repeat.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mouse Maze Problem
    By Furbiesandbeans in forum C++ Programming
    Replies: 13
    Last Post: 04-28-2008, 04:20 PM
  2. making camera move with mouse
    By Ti22 in forum Game Programming
    Replies: 13
    Last Post: 01-16-2005, 08:56 AM
  3. mouse move & control ID
    By SuperNewbie in forum Windows Programming
    Replies: 7
    Last Post: 01-20-2004, 03:49 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Formatting Output
    By Aakash Datt in forum C++ Programming
    Replies: 2
    Last Post: 05-16-2003, 08:20 PM