Get Mouse Click position
-
Hello, How do I grab the info where the mouse is so I can determine the position of the mouse when clicked over a certain region of the screen (say, over a certain part of a bitmap)? I'm creating a dialog based app. thanks!
The button down/up messages have the coordinates encoded in the LPARAM. There's also GetCursorPos(). Mark
-
The button down/up messages have the coordinates encoded in the LPARAM. There's also GetCursorPos(). Mark
-
Note that there is an important difference between the two ways Mark gave you to get the mouse position. The position associated with the window message may be different than the one you get from
GetCursorPos()
-- the former is the one at the time the message was sent, the latter is the mouse's position at the time of the call. If your application is very busy, the two values can be very different. You likely want the position associated with the message:GetCurrentMessage() -> pt
Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles