Point to X, Y?

Started by
2 comments, last by Code Is Your Friend 15 years, 7 months ago
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
Advertisement
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?
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)
Thanks!

This topic is closed to new replies.

Advertisement