If you want a POINTS struct with 10, 10 just do it like any other structure:
Code:
POINTS pts;
pts.x = 10;
pts.y = 10;
or, even easier:
Code:
POINTS pts = { 10, 10 };
The MAKEPOINTS macro is a helper macro that can be used with certain window messages. For example the WM_RBUTTONDOWN passes an x, y value in the lParam:
Originally Posted by
MSDN WM_RBUTTONDOWN
lParam
The low-order word(the lower 16 bits) specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
The high-order word(the upper 16 bits) specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
Now, instead of extracting the x,y values manually, we can just use the MAKEPOINTS macro.
Code:
int x = MAKEPOINTS(lParam).x;
int y = MAKEPOINTS(lParam).y;