Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

pch.h File Reference

#include <windows.h>
#include <windowsx.h>

Go to the source code of this file.

Defines

#define SetWindowPos   NtUserSetWindowPos
#define GetDC   NtUserGetDC
#define DeferWindowPos   NtUserDeferWindowPos
#define DestroyWindow   NtUserDestroyWindow

Functions

BOOL NtUserSetWindowPos (IN HWND hwnd, IN HWND hwndInsertAfter, IN int x, IN int y, IN int cx, IN int cy, IN UINT dwFlags)
HDC NtUserGetDC (IN HWND hwnd)
HANDLE NtUserDeferWindowPos (IN HDWP hWinPosInfo, IN HWND hwnd, IN HWND hwndInsertAfter, IN int x, IN int y, IN int cx, IN int cy, IN UINT wFlags)
BOOL NtUserDestroyWindow (IN HWND hwnd)


Define Documentation

#define DeferWindowPos   NtUserDeferWindowPos
 

Definition at line 27 of file w32/ntuser/client/nt6/pch.h.

Referenced by CScaleDlg::ResizeControls(), CResizeDlg::ResizeControls(), and CResizeDlg::SetGripperPos().

#define DestroyWindow   NtUserDestroyWindow
 

Definition at line 39 of file w32/ntuser/client/nt6/pch.h.

Referenced by CreateWindowsWindow(), CDialog::Destroy(), DestroyWindowsWindow(), EndTaskDlgProc(), ImmDestroySoftKeyboard(), InitConsoleIME(), msProfAvgDlgCreate(), msProfAvgDlgCreateDestroy(), msProfAvgDlgCreateDestroyEmpty(), msProfAvgDlgCreateDestroyNoFont(), msProfAvgDlgCreateDestroyNoMenu(), msProfAvgDlgDraw(), msProfCallback(), msProfCreateDestroyButton(), msProfCreateDestroyChildWindow(), msProfCreateDestroyCombobox(), msProfCreateDestroyEdit(), msProfCreateDestroyListbox(), msProfCreateDestroyScrollbar(), msProfCreateDestroyStatic(), msProfCreateDestroyWindow(), msProfDispatchMessage(), msProfGetWindowLong(), msProfListboxInsert1(), msProfListboxInsert2(), msProfListboxInsert3(), msProfSendMessage(), msProfSetWindowLong(), msProfTranslateMessage(), msProfUpdateWindow(), SendMessageDiffThreadFunc(), ThreadShutdownNotify(), TranslateIMESubFunctions(), WndProc(), and CDlg::~CDlg().

#define GetDC   NtUserGetDC
 

Definition at line 21 of file w32/ntuser/client/nt6/pch.h.

Referenced by CResizeDlg::Annotate(), ChooseNewFont(), ClearDlg(), Create(), CreateC1Window(), CreateWindowsWindow(), DecompileBitmap(), EndTaskDlgProc(), GetSKT1TextMetric(), InitSKT1Bitmap(), InternalImeMenuCreateBitmap(), SetSKT1Data(), SKC1ButtonDown(), SKC1ButtonUp(), SKC1MouseMove(), SKT1InvertButton(), SKWndProcC1(), UpdateSKC1Window(), and WndProc().

#define SetWindowPos   NtUserSetWindowPos
 

Definition at line 9 of file w32/ntuser/client/nt6/pch.h.

Referenced by CDialog::Adjust(), CResizeDlg::DlgProc(), EndTaskDlgProc(), msProfMove(), msProfSize(), PositionConsoleWindow(), PropertiesUpdate(), CResizeControlGeneric::Resize(), SetEndTaskDlgStatus(), SKC1ButtonUp(), SKT1ButtonUp(), SKWndProcC1(), SKWndProcT1(), and UpdateWindowSize().


Function Documentation

HANDLE NtUserDeferWindowPos IN HDWP  hWinPosInfo,
IN HWND  hwnd,
IN HWND  hwndInsertAfter,
IN int  x,
IN int  y,
IN int  cx,
IN int  cy,
IN UINT  wFlags
 

Definition at line 1761 of file kernel/ntstubs.c.

01770 { 01771 PWND pwnd; 01772 PWND pwndInsertAfter; 01773 PSMWP psmwp; 01774 01775 BEGINATOMICRECV(HANDLE, NULL); 01776 01777 TESTFLAGS(wFlags, SWP_VALID); 01778 01779 ValidateHWNDND(pwnd, hwnd); 01780 ValidateHWNDIA(pwndInsertAfter, hwndInsertAfter); 01781 ValidateHDWP(psmwp, hWinPosInfo); 01782 01783 if (wFlags & ~(SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | 01784 SWP_NOREDRAW | SWP_NOACTIVATE | SWP_FRAMECHANGED | 01785 SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS | 01786 SWP_NOOWNERZORDER)) { 01787 RIPERR1(ERROR_INVALID_PARAMETER, RIP_WARNING, "Invalid flags (0x%lx) passed to DeferWindowPos", 01788 wFlags); 01789 MSGERROR(0); 01790 } 01791 01792 /* 01793 * Make sure the window coordinates can fit in WORDs. 01794 */ 01795 if (!(wFlags & SWP_NOMOVE)) { 01796 if (x > SHRT_MAX) { 01797 x = SHRT_MAX; 01798 } else if (x < SHRT_MIN) { 01799 x = SHRT_MIN; 01800 } 01801 if (y > SHRT_MAX) { 01802 y = SHRT_MAX; 01803 } else if (y < SHRT_MIN) { 01804 y = SHRT_MIN; 01805 } 01806 } 01807 01808 /* 01809 * Actually, if we were going to be really strict about this we'd 01810 * make sure that x + cx < SHRT_MAX, etc but since we do maintain 01811 * signed 32-bit coords internally this case doesn't cause a problem. 01812 */ 01813 if (!(wFlags & SWP_NOSIZE)) { 01814 if (cx < 0) { 01815 cx = 0; 01816 } else if (cx > SHRT_MAX) { 01817 cx = SHRT_MAX; 01818 } 01819 if (cy < 0) { 01820 cy = 0; 01821 } else if (cy > SHRT_MAX) { 01822 cy = SHRT_MAX; 01823 } 01824 } 01825 01826 #ifdef NEVER 01827 // 01828 // do not fail these conditions because real apps use them. 01829 // 01830 if (!(wFlags & SWP_NOMOVE) && 01831 (x > SHRT_MAX || x < SHRT_MIN || 01832 y > SHRT_MAX || y < SHRT_MIN)) { 01833 RIPERR0(ERROR_INVALID_PARAMETER, RIP_WARNING, "Invalid coordinate passed to SetWindowPos"); 01834 MSGERROR(0); 01835 } 01836 01837 /* 01838 * Actually, if we were going to be really strict about this we'd 01839 * make sure that x + cx < SHRT_MAX, etc but since we do maintain 01840 * signed 32-bit coords internally this case doesn't cause a problem. 01841 */ 01842 if (!(wFlags & SWP_NOSIZE) && 01843 (cx < 0 || cx > SHRT_MAX || 01844 cy < 0 || cy > SHRT_MAX)) { 01845 RIPERR0(ERROR_INVALID_PARAMETER, RIP_WARNING, "Invalid width/height passed to SetWindowPos"); 01846 MSGERROR(0); 01847 } 01848 #endif 01849 01850 retval = _DeferWindowPos( 01851 psmwp, 01852 pwnd, 01853 pwndInsertAfter, 01854 x, 01855 y, 01856 cx, 01857 cy, 01858 wFlags); 01859 retval = PtoH((PVOID)retval); 01860 01861 TRACE("NtUserDeferWindowPos"); 01862 ENDATOMICRECV(); 01863 }

BOOL NtUserDestroyWindow IN HWND  hwnd  ) 
 

Definition at line 4115 of file kernel/ntstubs.c.

04117 { 04118 04119 // 04120 // N.B. This function has implicit window handle translation. This 04121 // operation is performed in the User server API dispatcher. 04122 // 04123 04124 BEGINRECV_HWND(DWORD, 0, hwnd); 04125 04126 retval = xxxDestroyWindow(pwnd); 04127 04128 TRACE("NtUserDestroyWindow"); 04129 ENDRECV_HWND(); 04130 }

HDC NtUserGetDC IN HWND  hwnd  ) 
 

Definition at line 6624 of file kernel/ntstubs.c.

06626 { 06627 PWND pwnd; 06628 BOOL bValid = TRUE; 06629 06630 BEGINATOMICRECV(HDC, NULL); 06631 06632 ValidateHWNDOPT(pwnd, hwnd); 06633 06634 if (IS_CURRENT_THREAD_RESTRICTED(JOB_OBJECT_UILIMIT_HANDLES) && pwnd == NULL) { 06635 06636 PDESKTOP pdesk = PtiCurrent()->rpdesk; 06637 06638 /* 06639 * make sure it has access to the desktop window 06640 */ 06641 if (!ValidateHwnd(PtoH(pdesk->pDeskInfo->spwnd))) { 06642 bValid = FALSE; 06643 } 06644 } 06645 06646 retval = _GetDC(pwnd); 06647 06648 if (!bValid) { 06649 06650 HRGN hrgn; 06651 06652 /* 06653 * Select a NULL visible region on this DC so that restricted 06654 * processes don't mess with GetDC(NULL) 06655 */ 06656 hrgn = CreateEmptyRgn(); 06657 06658 GreSelectVisRgn(retval, hrgn, SVR_DELETEOLD); 06659 } 06660 06661 TRACE("NtUserGetDC"); 06662 ENDATOMICRECV(); 06663 }

BOOL NtUserSetWindowPos IN HWND  hwnd,
IN HWND  hwndInsertAfter,
IN int  x,
IN int  y,
IN int  cx,
IN int  cy,
IN UINT  dwFlags
 

Definition at line 2180 of file kernel/ntstubs.c.

02188 { 02189 PWND pwndT; 02190 PWND pwndInsertAfter; 02191 TL tlpwndT; 02192 02193 BEGINRECV_HWNDLOCK_ND(BOOL, FALSE, hwnd); 02194 02195 TESTFLAGS(dwFlags, SWP_VALID); 02196 02197 ValidateHWNDIA(pwndInsertAfter, hwndInsertAfter); 02198 02199 /* 02200 * Let's not allow the window to be shown/hidden once we 02201 * started the destruction of the window. 02202 */ 02203 if (TestWF(pwndND, WFINDESTROY)) { 02204 RIPERR1(ERROR_INVALID_PARAMETER, 02205 RIP_WARNING, 02206 "SetWindowPos: Window is being destroyed (pwnd == %#p)", 02207 pwndND); 02208 MSGERROR(0); 02209 } 02210 02211 if (dwFlags & ~SWP_VALID) { 02212 RIPERR1(ERROR_INVALID_PARAMETER, 02213 RIP_WARNING, 02214 "SetWindowPos: Invalid flags passed in (flags == 0x%lx)", 02215 dwFlags); 02216 MSGERROR(0); 02217 } 02218 02219 /* 02220 * Make sure the window coordinates can fit in WORDs. 02221 */ 02222 if (!(dwFlags & SWP_NOMOVE)) { 02223 if (x > SHRT_MAX) { 02224 x = SHRT_MAX; 02225 } else if (x < SHRT_MIN) { 02226 x = SHRT_MIN; 02227 } 02228 if (y > SHRT_MAX) { 02229 y = SHRT_MAX; 02230 } else if (y < SHRT_MIN) { 02231 y = SHRT_MIN; 02232 } 02233 } 02234 02235 /* 02236 * Actually, if we were going to be really strict about this we'd 02237 * make sure that x + cx < SHRT_MAX, etc but since we do maintain 02238 * signed 32-bit coords internally this case doesn't cause a problem. 02239 */ 02240 if (!(dwFlags & SWP_NOSIZE)) { 02241 if (cx < 0) { 02242 cx = 0; 02243 } else if (cx > SHRT_MAX) { 02244 cx = SHRT_MAX; 02245 } 02246 if (cy < 0) { 02247 cy = 0; 02248 } else if (cy > SHRT_MAX) { 02249 cy = SHRT_MAX; 02250 } 02251 } 02252 02253 #ifdef NEVER 02254 // 02255 // do not fail these conditions because real apps use them. 02256 // 02257 if (!(dwFlags & SWP_NOMOVE) && 02258 (x > SHRT_MAX || x < SHRT_MIN || 02259 y > SHRT_MAX || y < SHRT_MIN)) { 02260 RIPERR0(ERROR_INVALID_PARAMETER, RIP_WARNING, "Invalid coordinate passed to SetWindowPos"); 02261 MSGERROR(0); 02262 } 02263 02264 /* 02265 * Actually, if we were going to be really strict about this we'd 02266 * make sure that x + cx < SHRT_MAX, etc but since we do maintain 02267 * signed 32-bit coords internally this case doesn't cause a problem. 02268 */ 02269 if (!(dwFlags & SWP_NOSIZE) && 02270 (cx < 0 || cx > SHRT_MAX || 02271 cy < 0 || cy > SHRT_MAX)) { 02272 RIPERR0(ERROR_INVALID_PARAMETER, RIP_WARNING, "Invalid width/height passed to SetWindowPos"); 02273 MSGERROR(0); 02274 } 02275 #endif 02276 02277 switch((ULONG_PTR)pwndInsertAfter) { 02278 case (ULONG_PTR)HWND_TOPMOST: 02279 case (ULONG_PTR)HWND_NOTOPMOST: 02280 case (ULONG_PTR)HWND_TOP: 02281 case (ULONG_PTR)HWND_BOTTOM: 02282 pwndT = NULL; 02283 break; 02284 02285 default: 02286 pwndT = pwndInsertAfter; 02287 break; 02288 } 02289 02290 ThreadLockWithPti(ptiCurrent, pwndT, &tlpwndT); 02291 02292 retval = xxxSetWindowPos( 02293 pwndND, 02294 pwndInsertAfter, 02295 x, 02296 y, 02297 cx, 02298 cy, 02299 dwFlags); 02300 02301 ThreadUnlock(&tlpwndT); 02302 02303 TRACE("NtUserSetWindowPos"); 02304 ENDRECV_HWNDLOCK_ND(); 02305 }


Generated on Sat May 15 19:45:01 2004 for test by doxygen 1.3.7