Advertisement

Mouse co-ord's next to cursor help

Started by March 29, 2001 07:59 AM
3 comments, last by Zeke 23 years, 10 months ago
I know how to get the mouse coordinates but what I need to do is put the coordinates next to the cursor for the duration of the program (like as a tool tip). Can anyone tell me the best way of going about this. Im using c++ and win32 (not mfc). Thanks for your time Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
RTFM .
Ok, only this once then, look for SetCursorPos() and GetCaretPos() in msdn.
Advertisement
It might just be me but I don''t see how that helps. SetCursorPos moves the cursor to a specified location (I dont need the program to move the cursor) and GetCaretPos copies the caret''s position, in client coordinates, to the specifiedPOINT structure, however I''m not doing anything with caret''s.

You sound like you know what you are talking about and its probably just me being stupid but I just dont get how I can use those functions to do what i want.

Thanks


Just my thoughts take them as you will.

"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
I guess I misunderstood your post. I thought you meant putting the cursor by the caret, must have been tired yesterday afternoon... Rereading a couple of times...ahh, ok so you want to print the mouse coordinates under the cursor... now I see. Well, the simplest way would be to simply do a TextOut() right under the cursor. This would of course require that you redraw at least that part of the window every frame. Another way would be to have width*height cursors in your resource file and switching between them. That would probably look better, but doesn''t scale so well...
I hope that helps a little more...
Thanks very much, Ill give the textout idea a go. Cheers

Just my thoughts take them as you will.

"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face

This topic is closed to new replies.

Advertisement