News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Drawing mouse coordinates

Started by Moskacz, February 03, 2013, 10:54:25 AM

Previous topic - Next topic

MichaelW

If you capture the mouse, typically to track its position outside your window, then the client coordinates as reported by the various mouse messages, are negative when the mouse cursor is to the left of and/or above the window.
Well Microsoft, here's another nice mess you've gotten us into.

dedndave

that's true
however, if you design the code so that it doesn't report positions outside the window...
i.e., you ReleaseCapture when such a position is detected, and do not display it

hfheatherfox07

Quote from: Moskacz on February 04, 2013, 02:39:42 AM
Thanks!

Stupid mistake, now everything is working!  :t

I get an error even before converting the co-ordinates with "invoke crt__ltoa"  when you left click you get:

Left_Button  Right_Buton , co-ordinates

even after converting with "invoke crt__ltoa" still get the last co-ordinate of right click when left clicking ?
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

dedndave

hard to trouble shoot it without seeing the code   :P

hfheatherfox07

Quote from: dedndave on February 04, 2013, 09:08:00 AM
hard to trouble shoot it without seeing the code   :P

I agree , just nice to post the finished code ....more people will see it in the future and learn from it .... At least I do , when people help me I post the finished code for others to refer to  :biggrin:
It is a modified version of Iczelion's tut 7...

I was referring to the original code Moskacz posted ....
Compile it and you see when you left click...
I am under the impression that all that was added was the co ordinaries printing on the screen
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.