POINT MAKEPOINT(lval) | |||||
DWORD lval; | /* coordinates of a point | */ |
The MAKEPOINT macro converts a long value that contains the x- and y-coordinates of a point into a POINT structure. This macro is useful for converting the long value returned by the GetMessagePos function into a POINT structure and for converting the lParam value passed with mouse messages into a POINT structure containing the mouse coordinates.
lval
Specifies the coordinates of a point. The x-coordinate is in the low-order word, and the y-coordinate is in the high-order word.
The return value is a pointer to a POINT structure.
The MAKEPOINT macro is defined in WINDOWS.H as follows:
#define MAKEPOINT(l) (*((POINT FAR*)&(l)))
The POINT structure has the following form:
typedef struct tagPOINT { /* pt */
int x;
int y;
} POINT;
The MAKEPOINT macro is not compatible with the Windows 32-bit application programming interface (API).