http://bugs.winehq.org/show_bug.cgi?id=31769
Bug #: 31769 Summary: windowsx.h macro HANDLE_WM_DISPLAYCHANGE is incorrect Product: Wine Version: 1.4.1 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jc.gervais@videotron.ca Classification: Unclassified
windowsx.h macro HANDLE_WM_DISPLAYCHANGE is erroneous:
The CY parameter is not cracked correctly for the function pointer argument.
This is because of a simple typo - the macro is defined thus: #define HANDLE_WM_DISPLAYCHANGE(hwnd, wParam, lParam, fn) ((fn)((hwnd), (UINT)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(wParam)), 0L)
but should be defined this way:
#define HANDLE_WM_DISPLAYCHANGE(hwnd, wParam, lParam, fn) ((fn)((hwnd), (UINT)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
HIWORD( wParam ) is incorrectly used for the CY value when in fact it is encoded in HIWORD( lParam )
That is all. Thank you for your hard work, great persistence and attention to detail.