I had not thought about choice of format.
one of those "lil things" that could cause "Such Problems" later
maybe LO should be match with LONG rather than DWORD so negative values match???
Announcement
Collapse
No announcement yet.
MakePoints
Collapse
X
-
Just do this
Code:MACRO MAKEPOINTS(lParam, pt) pt.x = LOINT(lParam) pt.y = HIINT(lParam) END MACRO
Why did you use loword?
Leave a comment:
-
Probably NOT an oversight...
From Windef.h
Code:typedef struct tagPOINTS { #ifndef _MAC SHORT x; SHORT y; #else SHORT y; SHORT x; #endif } POINTS, *PPOINTS, *LPPOINTS;
from wingdi.h
Code:#define MAKEPOINTS(l) (*((POINTS FAR *)&(l)))
Leave a comment:
-
It is not an oversight. It simply can't be translated because it returns an structure and neither PB macros nor PB functions can currently do it.
Code:POINTS MAKEPOINTS( DWORD dwValue );
Leave a comment:
-
MakePoints
Temporarily I am using
Code:MACRO MAKEPOINTS(lParam, pt) pt.x = BITS%(LOWRD(lParam)) pt.y = BITS%(HIWRD(lParam)) END MACRO
Remarks
The MAKEPOINTS macro can be used to convert the lParam parameter to a POINTS structure.Tags: None
Leave a comment: