Author: jimtabor
Date: Mon May 28 04:49:15 2012
New Revision: 56663
URL:
http://svn.reactos.org/svn/reactos?rev=56663&view=rev
Log:
[Win32SS]
- Add utility of setting and clearing the state bits from user space. Use this later.
Modified:
trunk/reactos/win32ss/include/ntuser.h
trunk/reactos/win32ss/user/ntuser/simplecall.c
trunk/reactos/win32ss/user/ntuser/userfuncs.h
trunk/reactos/win32ss/user/user32/include/ntwrapper.h
trunk/reactos/win32ss/user/user32/misc/misc.c
Modified: trunk/reactos/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Mon May 28 04:49:15 2012
@@ -521,6 +521,8 @@
#define WNDS_ANSICREATOR 0x20000000
#define WNDS_MAXIMIZESTOMONITOR 0x40000000
#define WNDS_DESTROYED 0x80000000
+
+#define WNDSACTIVEFRAME 0x00000006
// State2 Flags !Not Implemented!
#define WNDS2_WMPAINTSENT 0X00000001
Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Mon May 28 04:49:15 2012
@@ -569,9 +569,9 @@
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 @@
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;
Modified: trunk/reactos/win32ss/user/ntuser/userfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/userfu…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/userfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/userfuncs.h [iso-8859-1] Mon May 28 04:49:15 2012
@@ -81,6 +81,9 @@
PVOID pvParam,
UINT fWinIni);
+VOID FASTCALL IntSetWindowState(PWND, UINT);
+VOID FASTCALL IntClearWindowState(PWND, UINT);
+
/*************** MESSAGE.C ***************/
BOOL FASTCALL
Modified: trunk/reactos/win32ss/user/user32/include/ntwrapper.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
==============================================================================
--- trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] Mon May 28 04:49:15
2012
@@ -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 @@
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);
Modified: trunk/reactos/win32ss/user/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/m…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/misc.c [iso-8859-1] Mon May 28 04:49:15 2012
@@ -255,6 +255,24 @@
else
return (NtUserQueryWindow(Wnd->head.h, QUERY_WINDOW_UNIQUE_PROCESS_ID) ==
(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