[PATCH 1/2] user32: convert screen coordinates for send WM_SIZING message (resend)

Alexandre Julliard julliard at winehq.org
Thu Apr 29 10:35:24 CDT 2010


Konstantin Kondratyuk <kondratyuk at etersoft.ru> writes:

> @@ -2575,11 +2576,24 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
>                  if(!iconic && !DragFullWindows) draw_moving_frame( hdc, &sizingRect, thickframe );
>                  capturePoint = pt;
>  
> +                /* convert to screen coordinates */
> +                if(parent)
> +                {
> +                    POINT* p = (POINT*) &newRect;
> +                    ClientToScreen( parent, p );
> +                    ClientToScreen( parent, ++p );
> +                    converted = TRUE;
> +                }
> +
>                  /* determine the hit location */
>                  if (hittest >= HTLEFT && hittest <= HTBOTTOMRIGHT)
>                      wpSizingHit = WMSZ_LEFT + (hittest - HTLEFT);
>                  SendMessageW( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&newRect );
>  
> +                /* convert back to client coordinates id needed */
> +                if(converted)
> +                    MapWindowPoints( 0, parent, (POINT*)&newRect, 2 );
> +

You should be using MapWindowPoints for the first case too, and there's
no need for that extra boolean variable.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list