From: <no...@so...> - 2002-09-06 06:27:47
|
Patches item #605054, was opened at 2002-09-05 13:27 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=605054&group_id=2435 Category: None Group: None Status: Closed Resolution: Rejected Priority: 5 Submitted By: Gyorgy Horvath (horvaath) Assigned to: Nobody/Anonymous (nobody) Summary: POINTSTOPOINT in WINUSER.H Initial Comment: POINTSTOPOINT macro in WINUSER.H line 2445 should be: #define POINTSTOPOINT(p,ps) {(p).x=LOWORD(ps);(p).y=HIWORD(ps);} ---------------------------------------------------------------------- >Comment By: Gyorgy Horvath (horvaath) Date: 2002-09-06 06:27 Message: 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. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2002-09-05 20:50 Message: 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; } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=605054&group_id=2435 |