Finding coordinates

This is a discussion on Finding coordinates within the C++ Programming forums, part of the General Programming Boards category; It is possible to get the current position of the cursor. Preferably as a coord, but it doesn't really matter. ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    70

    Finding coordinates

    It is possible to get the current position of the cursor. Preferably as a coord, but it doesn't really matter. This may belong in Windows programming more than here..but it's pretty basic, so sorry in advance if it's out of place.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    For windows: GetCursorPos. Or you could handle the WM_MOUSEMOVE message specifically for a window. In fact, every windows message gets the mouse coordinates in the MSG structure used by GetMessage or PeekMessage.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Finding mouse coordinates without disturbing its position
    By abachler in forum Networking/Device Communication
    Replies: 4
    Last Post: 10-21-2008, 11:19 AM
  2. finding the screen coordinates of a pixel
    By ShadowBeast in forum C# Programming
    Replies: 7
    Last Post: 04-27-2007, 05:42 AM
  3. Converting from Screen to World Coordinates
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 05-11-2004, 12:51 PM
  4. Size of 1 pixel
    By ooosawaddee3 in forum C++ Programming
    Replies: 4
    Last Post: 07-26-2002, 08:06 PM
  5. Finding window with coordinates
    By -KEN- in forum Windows Programming
    Replies: 4
    Last Post: 02-24-2002, 06:22 PM

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