diff --git a/reactos/win32ss/include/ntuser.h b/reactos/win32ss/include/ntuser.h index 18ff512aaf2..0a21bb9bb29 100644 --- a/reactos/win32ss/include/ntuser.h +++ b/reactos/win32ss/include/ntuser.h @@ -522,6 +522,8 @@ typedef struct _SBINFOEX #define WNDS_MAXIMIZESTOMONITOR 0x40000000 #define WNDS_DESTROYED 0x80000000 +#define WNDSACTIVEFRAME 0x00000006 + // State2 Flags !Not Implemented! #define WNDS2_WMPAINTSENT 0X00000001 #define WNDS2_ENDPAINTINVALIDATE 0X00000002 diff --git a/reactos/win32ss/user/ntuser/simplecall.c b/reactos/win32ss/user/ntuser/simplecall.c index ffeb2d119ae..38267aa55fb 100644 --- a/reactos/win32ss/user/ntuser/simplecall.c +++ b/reactos/win32ss/user/ntuser/simplecall.c @@ -569,9 +569,9 @@ NtUserCallHwndLock( break; case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW: - TRACE("co_IntSetForegroundWindow 1 %p\n",hWnd); + ERR("co_IntSetForegroundWindow 1 %p\n",hWnd); Ret = co_IntSetForegroundWindow(Window); - TRACE("co_IntSetForegroundWindow 2 \n"); + ERR("co_IntSetForegroundWindow 2 \n"); break; case HWNDLOCK_ROUTINE_UPDATEWINDOW: @@ -749,6 +749,24 @@ NtUserCallHwndParam( UserLeave(); return 0; } + case HWNDPARAM_ROUTINE_CLEARWINDOWSTATE: + { + PWND pWnd; + UserEnterExclusive(); + pWnd = UserGetWindowObject(hWnd); + if (pWnd) IntClearWindowState(pWnd, (UINT)Param); + UserLeave(); + return 0; + } + case HWNDPARAM_ROUTINE_SETWINDOWSTATE: + { + PWND pWnd; + UserEnterExclusive(); + pWnd = UserGetWindowObject(hWnd); + if (pWnd) IntSetWindowState(pWnd, (UINT)Param); + UserLeave(); + return 0; + } } STUB; diff --git a/reactos/win32ss/user/ntuser/userfuncs.h b/reactos/win32ss/user/ntuser/userfuncs.h index a75c406428c..1bfc8f8328f 100644 --- a/reactos/win32ss/user/ntuser/userfuncs.h +++ b/reactos/win32ss/user/ntuser/userfuncs.h @@ -81,6 +81,9 @@ UserSystemParametersInfo( PVOID pvParam, UINT fWinIni); +VOID FASTCALL IntSetWindowState(PWND, UINT); +VOID FASTCALL IntClearWindowState(PWND, UINT); + /*************** MESSAGE.C ***************/ BOOL FASTCALL diff --git a/reactos/win32ss/user/user32/include/ntwrapper.h b/reactos/win32ss/user/user32/include/ntwrapper.h index 711a3a9a932..2ce69aac835 100644 --- a/reactos/win32ss/user/user32/include/ntwrapper.h +++ b/reactos/win32ss/user/user32/include/ntwrapper.h @@ -6,6 +6,8 @@ #error #endif +BOOL FASTCALL TestState(PWND, UINT); + EXTINLINE BOOL WINAPI GetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) { @@ -732,6 +734,18 @@ EXTINLINE BOOL NtUserxSetMessageBox(HWND hWnd) return NtUserCallHwnd(hWnd, HWND_ROUTINE_SETMSGBOX); } +EXTINLINE VOID NtUserxClearWindowState(PWND pWnd, UINT Flag) +{ + if (!TestState(pWnd, Flag)) return; + NtUserCallHwndParam(UserHMGetHandle(pWnd), (DWORD_PTR)Flag, HWNDPARAM_ROUTINE_CLEARWINDOWSTATE); +} + +EXTINLINE VOID NtUserxSetWindowState(PWND pWnd, UINT Flag) +{ + if (TestState(pWnd, Flag)) return; + NtUserCallHwndParam(UserHMGetHandle(pWnd), (DWORD_PTR)Flag, HWNDPARAM_ROUTINE_SETWINDOWSTATE); +} + EXTINLINE HWND NtUserxSetTaskmanWindow(HWND hWnd) { return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW); diff --git a/reactos/win32ss/user/user32/misc/misc.c b/reactos/win32ss/user/user32/misc/misc.c index b729f3d889d..8059f4cef3c 100644 --- a/reactos/win32ss/user/user32/misc/misc.c +++ b/reactos/win32ss/user/user32/misc/misc.c @@ -257,6 +257,24 @@ TestWindowProcess(PWND Wnd) (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess ); } +BOOL +FASTCALL +TestState(PWND pWnd, UINT Flag) +{ + UINT bit; + bit = 1 << LOWORD(Flag); + switch(HIWORD(Flag)) + { + case 0: + return (pWnd->state & bit); + case 1: + return (pWnd->state2 & bit); + case 2: + return (pWnd->ExStyle2 & bit); + } + return FALSE; +} + PUSER_HANDLE_ENTRY FASTCALL GetUser32Handle(HANDLE handle)