From b22bc1a952bcecdeee00f924a29d3407d41b171a Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 28 May 2012 04:51:31 +0000 Subject: [PATCH] [Win32SS] - Add utility of setting and clearing the state bits from user space. Use this later. Fix build. svn path=/trunk/; revision=56664 --- reactos/win32ss/user/ntuser/misc.c | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/reactos/win32ss/user/ntuser/misc.c b/reactos/win32ss/user/ntuser/misc.c index 91f51153a96..3c8321f1f82 100644 --- a/reactos/win32ss/user/ntuser/misc.c +++ b/reactos/win32ss/user/ntuser/misc.c @@ -446,6 +446,48 @@ CLEANUP: END_CLEANUP; } +VOID FASTCALL +IntSetWindowState(PWND pWnd, UINT Flag) +{ + UINT bit; + if (gptiCurrent->ppi != pWnd->head.pti->ppi) return; + bit = 1 << LOWORD(Flag); + TRACE("SWS %x\n",bit); + switch(HIWORD(Flag)) + { + case 0: + pWnd->state |= bit; + break; + case 1: + pWnd->state2 |= bit; + break; + case 2: + pWnd->ExStyle2 |= bit; + break; + } +} + +VOID FASTCALL +IntClearWindowState(PWND pWnd, UINT Flag) +{ + UINT bit; + if (gptiCurrent->ppi != pWnd->head.pti->ppi) return; + bit = 1 << LOWORD(Flag); + TRACE("CWS %x\n",bit); + switch(HIWORD(Flag)) + { + case 0: + pWnd->state &= ~bit; + break; + case 1: + pWnd->state2 &= ~bit; + break; + case 2: + pWnd->ExStyle2 &= ~bit; + break; + } +} + NTSTATUS FASTCALL IntSafeCopyUnicodeString(PUNICODE_STRING Dest, PUNICODE_STRING Source)