* Sync to trunk HEAD (r53473).
[reactos.git] / base / applications / mspaint / winproc.c
index 3911074..c22898c 100644 (file)
@@ -482,7 +482,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                 {
                     SetCapture(hImageArea);
                     drawing = TRUE;
-                    startPaintingL(hDrawingDC, LOWORD(lParam) * 1000 / zoom, HIWORD(lParam) * 1000 / zoom,
+                    startPaintingL(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom,
                                    fgColor, bgColor);
                 }
                 else
@@ -492,7 +492,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                 }
                 SendMessage(hImageArea, WM_PAINT, 0, 0);
                 if ((activeTool == TOOL_ZOOM) && (zoom < 8000))
-                    zoomTo(zoom * 2, LOWORD(lParam), HIWORD(lParam));
+                    zoomTo(zoom * 2, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
             }
             break;
 
@@ -503,7 +503,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                 {
                     SetCapture(hImageArea);
                     drawing = TRUE;
-                    startPaintingR(hDrawingDC, LOWORD(lParam) * 1000 / zoom, HIWORD(lParam) * 1000 / zoom,
+                    startPaintingR(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom,
                                    fgColor, bgColor);
                 }
                 else
@@ -513,7 +513,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                 }
                 SendMessage(hImageArea, WM_PAINT, 0, 0);
                 if ((activeTool == TOOL_ZOOM) && (zoom > 125))
-                    zoomTo(zoom / 2, LOWORD(lParam), HIWORD(lParam));
+                    zoomTo(zoom / 2, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
             }
             break;
 
@@ -522,13 +522,13 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
             {
                 ReleaseCapture();
                 drawing = FALSE;
-                endPaintingL(hDrawingDC, LOWORD(lParam) * 1000 / zoom, HIWORD(lParam) * 1000 / zoom, fgColor,
+                endPaintingL(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom, fgColor,
                              bgColor);
                 SendMessage(hImageArea, WM_PAINT, 0, 0);
                 if (activeTool == TOOL_COLOR)
                 {
                     int tempColor =
-                        GetPixel(hDrawingDC, LOWORD(lParam) * 1000 / zoom, HIWORD(lParam) * 1000 / zoom);
+                        GetPixel(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom);
                     if (tempColor != CLR_INVALID)
                         fgColor = tempColor;
                     SendMessage(hPalWin, WM_PAINT, 0, 0);
@@ -542,13 +542,13 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
             {
                 ReleaseCapture();
                 drawing = FALSE;
-                endPaintingR(hDrawingDC, LOWORD(lParam) * 1000 / zoom, HIWORD(lParam) * 1000 / zoom, fgColor,
+                endPaintingR(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom, fgColor,
                              bgColor);
                 SendMessage(hImageArea, WM_PAINT, 0, 0);
                 if (activeTool == TOOL_COLOR)
                 {
                     int tempColor =
-                        GetPixel(hDrawingDC, LOWORD(lParam) * 1000 / zoom, HIWORD(lParam) * 1000 / zoom);
+                        GetPixel(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom);
                     if (tempColor != CLR_INVALID)
                         bgColor = tempColor;
                     SendMessage(hPalWin, WM_PAINT, 0, 0);
@@ -578,8 +578,8 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         case WM_MOUSEMOVE:
             if (hwnd == hImageArea)
             {
-                LONG xNow = LOWORD(lParam) * 1000 / zoom;
-                LONG yNow = HIWORD(lParam) * 1000 / zoom;
+                LONG xNow = GET_X_LPARAM(lParam) * 1000 / zoom;
+                LONG yNow = GET_Y_LPARAM(lParam) * 1000 / zoom;
                 if ((!drawing) || (activeTool <= TOOL_AIRBRUSH))
                 {
                     TRACKMOUSEEVENT tme;
@@ -587,7 +587,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                     if (activeTool == TOOL_ZOOM)
                     {
                         SendMessage(hImageArea, WM_PAINT, 0, 0);
-                        drawZoomFrame(LOWORD(lParam), HIWORD(lParam));
+                        drawZoomFrame(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
                     }
 
                     tme.cbSize = sizeof(TRACKMOUSEEVENT);