From 9d4bd6ebbd389ebe1cbcce883d66a08197929dc1 Mon Sep 17 00:00:00 2001 From: Konstantin Kondratyuk Date: Fri, 9 Apr 2010 14:07:02 +0400 Subject: [PATCH 1/3] user32: convert screen coordinates for send WM_SIZING message --- dlls/user32/winpos.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 5776d2e..8f87e89 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2566,6 +2566,7 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) { RECT newRect = sizingRect; WPARAM wpSizingHit = 0; + BOOL converted = FALSE; if (hittest == HTCAPTION) OffsetRect( &newRect, dx, dy ); if (ON_LEFT_BORDER(hittest)) newRect.left += dx; @@ -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 ); + if (!iconic) { if(!DragFullWindows) -- 1.6.5.8