What is pts? It is not in the Macro's argument list.
Nevertheless, it simply cannot be compiled if I have not a
"pts"
declared in the scoipe of the given function invoking
POINTSTOPOINT.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=11494
No it shouldn't. Try copying a POINTS to a POINT using
you version eg:
#include <windows.h>
#include <stdio.h>
#undef POINTSTOPOINT
#define POINTSTOPOINT(p,ps) \
{(p).x=LOWORD(ps);(p).y=HIWORD(ps);}
int main(){
POINTS pts = {1, 1};
POINT pt = {0, 0};
POINTSTOPOINT( pt, pts);
printf ("%d\t%d", pt.x, pt.y);
return 0;
}
Logged In: YES
user_id=606343
The original I have downloaded looks:
#define POINTSTOPOINT(p,ps)
{(p).x=LOWORD(pts);(ps).y=HIWORD(ps);}
What is pts? It is not in the Macro's argument list.
Nevertheless, it simply cannot be compiled if I have not a
"pts"
declared in the scoipe of the given function invoking
POINTSTOPOINT.
Logged In: YES
user_id=11494
You must have an old version of w32api.
The current define is this:
#define POINTSTOPOINT(p,ps) { \
(p).x=LOWORD(*(DWORD *)&ps); \
(p).y=HIWORD(*(DWORD *)&ps); \
}
That works.
Your version
#define POINTSTOPOINT(p,ps) \
{(p).x=LOWORD(ps);(p).y=HIWORD(ps);}
does not work.
Before submitting a patch, please test it.
Danny