From 08aaa5d0a480bd2015d7c9332a6a93176ca91d6b Mon Sep 17 00:00:00 2001 From: NF Stevens Date: Thu, 22 Oct 1998 11:35:04 +0000 Subject: [PATCH] Fixed moving and sizing of child windows. --- windows/nonclient.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/windows/nonclient.c b/windows/nonclient.c index ff43659b08d..29f2a548321 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -1874,9 +1874,6 @@ static LONG NC_StartSizeMove( WND* wndPtr, WPARAM16 wParam, pt.y = wndPtr->rectWindow.top + rect.top + SYSMETRICS_CYSIZE/2; hittest = HTCAPTION; *capturePoint = pt; - - if (wndPtr->dwStyle & WS_CHILD) - ClientToScreen16( wndPtr->parent->hwndSelf, &pt ); } else /* SC_SIZE */ { @@ -1950,9 +1947,9 @@ static void NC_DoSizeMove( HWND32 hwnd, WORD wParam ) BOOL32 thickframe = HAS_THICKFRAME( wndPtr->dwStyle ); BOOL32 iconic = wndPtr->dwStyle & WS_MINIMIZE; BOOL32 moved = FALSE; + DWORD dwPoint = GetMessagePos (); - GetCursorPos16 (&pt); - capturePoint = pt; + capturePoint = pt = *(POINT16*)&dwPoint; if (IsZoomed32(hwnd) || !IsWindowVisible32(hwnd) || (wndPtr->flags & WIN_MANAGED)) return; @@ -2008,6 +2005,11 @@ static void NC_DoSizeMove( HWND32 hwnd, WORD wParam ) mouseRect.top = MAX( mouseRect.top, sizingRect.top+minTrack.y ); mouseRect.bottom = MIN( mouseRect.bottom, sizingRect.top+maxTrack.y ); } + if (wndPtr->dwStyle & WS_CHILD) + { + MapWindowPoints32( wndPtr->parent->hwndSelf, 0, + (LPPOINT32)&mouseRect, 2 ); + } SendMessage16( hwnd, WM_ENTERSIZEMOVE, 0, 0 ); if (GetCapture32() != hwnd) SetCapture32( hwnd ); @@ -2047,9 +2049,8 @@ static void NC_DoSizeMove( HWND32 hwnd, WORD wParam ) if ((msg.message != WM_KEYDOWN) && (msg.message != WM_MOUSEMOVE)) continue; /* We are not interested in other messages */ - pt = msg.pt; - if (wndPtr->dwStyle & WS_CHILD) - ScreenToClient16( wndPtr->parent->hwndSelf, &pt ); + dwPoint = GetMessagePos (); + pt = *(POINT16*)&dwPoint; if (msg.message == WM_KEYDOWN) switch(msg.wParam) { -- 2.11.4.GIT