|
-
April 17th, 1999, 05:05 PM
#1
Mouse Coordinates
Hi,
I'm drawing some graphics inside a CStatic, and I'm capturing a mouse click event in a class derived from CStatic. The message handler
is called fine, unfortunately it doesn't pass me the coordinates of the click. Any idea how I can get that manually? Thanks.
-
April 17th, 1999, 05:14 PM
#2
Re: Mouse Coordinates
You could try using GetCurrentMessage to get the MSG structure which contains the info (if I remember correctly).
Cheers,
Roger
-
April 19th, 1999, 02:39 AM
#3
Re: Mouse Coordinates
You could use:
---
CPoint ptMouse ;
POINT sPtMouse ;
::GetCursorPos(&sPtMouse);
ptMouse = sPtMouse ;
---
This, of course, relies on the message for the click being processed as quickly as a normal mouse message to a window, otherwise the mouse may have moved slightly since the message was generated.
Does this help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|