The Microsoft documentation specifies NOT to use LOWORD and HIWORD macros to extract the x/y positions as it won't work correctly with multiple monitors. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms645607(v=vs.85).aspx.
#include <string.h>
#include <stdio.h>
#include <assert.h>
+#include <windowsx.h>
#ifdef HAVE_OPENGL
#include <memory>
if( uMsg == WM_LBUTTONUP || uMsg == WM_RBUTTONUP || uMsg == WM_MBUTTONUP )
ReleaseCapture();
- pt.x = LOWORD( lParam );
- pt.y = HIWORD( lParam );
+ pt.x = GET_X_LPARAM( lParam );
+ pt.y = GET_Y_LPARAM( lParam );
GetClientRect( window->hwnd, &rect );
icvGetBitmapData( window, &size, 0, 0 );