diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 4b8e0bcd7fd..bae6f1f8cd6 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -1229,8 +1229,8 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM SetRect(&rect, 0, 0, LOWORD(lParam), HIWORD(lParam)); AdjustWindowRectEx(&rect, GetWindowLongA(ci->hwndActiveChild, GWL_STYLE), 0, GetWindowLongA(ci->hwndActiveChild, GWL_EXSTYLE) ); - MoveWindow(ci->hwndActiveChild, rect.left, rect.top, - rect.right - rect.left, rect.bottom - rect.top, 1); + NtUserMoveWindow( ci->hwndActiveChild, rect.left, rect.top, + rect.right - rect.left, rect.bottom - rect.top, 1 ); } else MDI_PostUpdate(hwnd, ci, SB_BOTH+1); @@ -1348,7 +1348,7 @@ LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient, break; case WM_SIZE: - MoveWindow(hwndMDIClient, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE); + NtUserMoveWindow( hwndMDIClient, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE ); break; case WM_NEXTMENU: diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index f9f2a1d04fe..02651649daf 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -1173,35 +1173,35 @@ static void SCROLL_CreateScrollBar(HWND hwnd, LPCREATESTRUCTW lpCreate) if (lpCreate->style & (SBS_SIZEGRIP | SBS_SIZEBOX)) { if (lpCreate->style & SBS_SIZEBOXTOPLEFTALIGN) - MoveWindow( hwnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL)+1, - GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); + NtUserMoveWindow( hwnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL)+1, + GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); else if(lpCreate->style & SBS_SIZEBOXBOTTOMRIGHTALIGN) - MoveWindow( hwnd, lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1, - lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1, - GetSystemMetrics(SM_CXVSCROLL)+1, - GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); + NtUserMoveWindow( hwnd, lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1, + lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1, + GetSystemMetrics(SM_CXVSCROLL)+1, + GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); } else if (lpCreate->style & SBS_VERT) { if (lpCreate->style & SBS_LEFTALIGN) - MoveWindow( hwnd, lpCreate->x, lpCreate->y, - GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE ); + NtUserMoveWindow( hwnd, lpCreate->x, lpCreate->y, + GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE ); else if (lpCreate->style & SBS_RIGHTALIGN) - MoveWindow( hwnd, - lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1, - lpCreate->y, - GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE ); + NtUserMoveWindow( hwnd, + lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1, + lpCreate->y, + GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE ); } else /* SBS_HORZ */ { if (lpCreate->style & SBS_TOPALIGN) - MoveWindow( hwnd, lpCreate->x, lpCreate->y, - lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); + NtUserMoveWindow( hwnd, lpCreate->x, lpCreate->y, + lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); else if (lpCreate->style & SBS_BOTTOMALIGN) - MoveWindow( hwnd, - lpCreate->x, - lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1, - lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); + NtUserMoveWindow( hwnd, + lpCreate->x, + lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1, + lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE ); } } diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 993812145b6..00700224f4a 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -542,7 +542,7 @@ @ stdcall MonitorFromPoint(int64 long) @ stdcall MonitorFromRect(ptr long) @ stdcall MonitorFromWindow(long long) -@ stdcall MoveWindow(long long long long long long) +@ stdcall MoveWindow(long long long long long long) NtUserMoveWindow @ stdcall MsgWaitForMultipleObjects(long ptr long long long) @ stdcall MsgWaitForMultipleObjectsEx(long ptr long long long) @ stdcall NotifyWinEvent(long long long long) NtUserNotifyWinEvent diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 8fe36ce4ab8..d144c53f4e4 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -561,19 +561,6 @@ BOOL WINAPI BringWindowToTop( HWND hwnd ) } -/*********************************************************************** - * MoveWindow (USER32.@) - */ -BOOL WINAPI MoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, - BOOL repaint ) -{ - int flags = SWP_NOZORDER | SWP_NOACTIVATE; - if (!repaint) flags |= SWP_NOREDRAW; - TRACE("%p %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint ); - return SetWindowPos( hwnd, 0, x, y, cx, cy, flags ); -} - - /******************************************************************* * get_work_rect * diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 797c07d96ef..bb4daf54279 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1177,6 +1177,7 @@ static struct unix_funcs unix_funcs = NtUserGetUpdatedClipboardFormats, NtUserIsClipboardFormatAvailable, NtUserMapVirtualKeyEx, + NtUserMoveWindow, NtUserRegisterClassExWOW, NtUserRegisterHotKey, NtUserScrollDC, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index bbb1c3c5fed..9e426b40e48 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1084,7 +1084,7 @@ @ stub NtUserMinMaximize @ stub NtUserModifyUserStartupInfoFlags @ stub NtUserModifyWindowTouchCapability -@ stub NtUserMoveWindow +@ stdcall NtUserMoveWindow(long long long long long long) @ stub NtUserMsgWaitForMultipleObjectsEx @ stub NtUserNavigateFocus @ stub NtUserNotifyIMEStatus diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 0c8dd6afaed..a3fbf8a8a4c 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -218,6 +218,7 @@ struct unix_funcs BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout ); + BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 714f7574fb7..e3564646d0a 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1276,6 +1276,17 @@ BOOL WINAPI NtUserSetWindowPos( HWND hwnd, HWND after, INT x, INT y, INT cx, INT return user_callbacks && user_callbacks->pSetWindowPos( hwnd, after, x, y, cx, cy, flags ); } +/*********************************************************************** + * NtUserMoveWindow (win32u.@) + */ +BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ) +{ + int flags = SWP_NOZORDER | SWP_NOACTIVATE; + if (!repaint) flags |= SWP_NOREDRAW; + TRACE( "%p %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint ); + return NtUserSetWindowPos( hwnd, 0, x, y, cx, cy, flags ); +} + /***************************************************************************** * NtUserGetLayeredWindowAttributes (win32u.@) */ diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 83e21d365bb..99c01c326c3 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -840,6 +840,12 @@ INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size ) return unix_funcs->pNtUserGetKeyNameText( lparam, buffer, size ); } +BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ) +{ + if (!unix_funcs) return 0; + return unix_funcs->pNtUserMoveWindow( hwnd, x, y, cx, cy, repaint ); +} + INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ) { if (!unix_funcs) return 0; diff --git a/include/ntuser.h b/include/ntuser.h index e5a01fe2f43..3c5c73f5f48 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -340,6 +340,9 @@ NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs INT WINAPI NtUserInternalGetWindowText( HWND hwnd, WCHAR *text, INT count ); BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ); UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout ); +BOOL WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, + ULONG_PTR result_info, DWORD type, BOOL ansi ); +BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); void WINAPI NtUserNotifyWinEvent( DWORD event, HWND hwnd, LONG object_id, LONG child_id ); HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access ); BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );