Point to X, Y?
How can you go about seperating the X and Y values from a point? I need the coords from GetCursorPos But it comes as a point. Anyone know?
Thanks,
Matt
The POINT structure has two members: x and y. Just use .x and .y to get the values (or ->x and ->y if you have a pointer).
Using the member selection operators on the POINT struct?
References:
GetCursorPos MSDN (first result of a google for "GetCursorPos")
POINT MSDN (linked to from that page)
POINT point;BOOL b = GetCursorPos(&point);// error checkingdo_funky_stuff(point.x, point.y);
References:
GetCursorPos MSDN (first result of a google for "GetCursorPos")
POINT MSDN (linked to from that page)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement