ReactOS  0.4.11-dev-721-g95bc44e
undocuser.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _BALLOON_HARD_ERROR_DATA
 
struct  _MSGBOXDATA
 
struct  _UAHOWP
 
struct  tagUSERAPIHOOK
 
struct  _USERAPIHOOKINFO
 

Macros

#define WC_MENU   (MAKEINTATOM(0x8000))
 
#define WC_DESKTOP   (MAKEINTATOM(0x8001))
 
#define WC_DIALOG   (MAKEINTATOM(0x8002))
 
#define WC_SWITCH   (MAKEINTATOM(0x8003))
 
#define WC_ICONTITLE   (MAKEINTATOM(0x8004))
 
#define ES_COMBO   0x200 /* Parent is a combobox */
 
#define WS_MAXIMIZED   WS_MAXIMIZE
 
#define WS_MINIMIZED   WS_MINIMIZE
 
#define WS_EX_DRAGDETECT   0x00000002
 
#define WS_EX_MAKEVISIBLEWHENUNGHOSTED   0x00000800
 
#define WS_EX_FORCELEGACYRESIZENCMETR   0x00800000
 
#define WS_EX_UISTATEACTIVE   0x04000000
 
#define WS_EX_REDIRECTED   0x20000000
 
#define WS_EX_UISTATEKBACCELHIDDEN   0x40000000
 
#define WS_EX_UISTATEFOCUSRECTHIDDEN   0x80000000
 
#define WS_EX_SETANSICREATOR   0x80000000
 
#define WM_SETVISIBLE   0x00000009
 
#define WM_ALTTABACTIVE   0x00000029
 
#define WM_ISACTIVEICON   0x00000035
 
#define WM_QUERYPARKICON   0x00000036
 
#define WM_CLIENTSHUTDOWN   0x0000003B
 
#define WM_COPYGLOBALDATA   0x00000049
 
#define WM_LOGONNOTIFY   0x0000004C
 
#define WM_KEYF1   0x0000004D
 
#define WM_KLUDGEMINRECT   0x0000008B
 
#define WM_UAHDRAWMENU   0x00000091
 
#define WM_UAHDRAWITEM   0x00000092
 
#define WM_UAHINITMENU   0x00000093
 
#define WM_UAHMEASUREITEM   0x00000094
 
#define WM_UAHDRAWMENUNC   0x00000095
 
#define WM_NCUAHDRAWCAPTION   0x000000AE
 
#define WM_NCUAHDRAWFRAME   0x000000AF
 
#define WM_SYSTIMER   0x00000118
 
#define WM_LBTRACKPOINT   0x00000131
 
#define WM_CBLOSTTEXTFOCUS   0x00000167
 
#define LB_CARETON   0x000001a3
 
#define LB_CARETOFF   0x000001a4
 
#define MN_SETHMENU   0x000001e0
 
#define WM_DROPOBJECT   0x0000022A
 
#define WM_QUERYDROPOBJECT   0x0000022B
 
#define WM_BEGINDRAG   0x0000022C
 
#define WM_DRAGLOOP   0x0000022D
 
#define WM_DRAGSELECT   0x0000022E
 
#define WM_DRAGMOVE   0x0000022F
 
#define WM_POPUPSYSTEMMENU   0x00000313
 
#define WM_UAHINIT   0x0000031b
 
#define WM_CBT   0x000003FF
 
#define WM_MAXIMUM   0x0001FFFF
 
#define DCX_USESTYLE   0x00010000
 
#define DCX_KEEPCLIPRGN   0x00040000
 
#define DCX_KEEPLAYOUT   0x40000000
 
#define DCX_PROCESSOWNED   0x80000000
 
#define TPM_SYSTEM_MENU   0x00000200
 
#define NUCWE_ANSI   0x00000001
 
#define NUCWE_SIDEBYSIDE   0x40000000
 
#define IDCARETTIMER   (0xffff)
 
#define ID_TME_TIMER   (0xFFFA)
 
#define SWP_NOCLIENTSIZE   0x0800
 
#define SWP_NOCLIENTMOVE   0x1000
 
#define SWP_STATECHANGED   0x8000
 
#define SIF_PREVIOUSPOS   4096
 
#define SW_SCROLLWNDDCE   0x8000
 
#define QS_SMRESULT   0x8000 /* see "Undoc. Windows" */
 
#define QS_EVENT   0x2000
 
#define QS_SYSEVENT   (QS_EVENT|QS_SENDMESSAGE)
 
#define MCS_ENDSESSION   1
 
#define MCS_QUERYENDSESSION   2
 
#define MCSR_GOODFORSHUTDOWN   1
 
#define MCSR_SHUTDOWNFINISHED   2
 
#define MCSR_DONOTSHUTDOWN   3
 
#define LN_LOGOFF   0x0
 
#define LN_SHELL_EXITED   0x2
 
#define LN_START_TASK_MANAGER   0x4
 
#define LN_LOCK_WORKSTATION   0x5
 
#define LN_UNLOCK_WORKSTATION   0x6
 
#define LN_MESSAGE_BEEP   0x9
 
#define LN_START_SCREENSAVE   0xA
 
#define LN_LOGOFF_CANCELED   0xB
 
#define EWX_SHUTDOWN_CANCELED   0x0080
 
#define EWX_CALLER_SYSTEM   0x0100
 
#define EWX_CALLER_WINLOGON   0x0200
 
#define EWX_CALLER_WINLOGON_LOGOFF   0x1000
 
#define EWX_NOTIFY   0x8000
 
#define EWX_NONOTIFY   0x10000
 
#define IPHK_HOTKEY   0x0001
 
#define IPHK_PROCESSBYIME   0x0002
 
#define IPHK_CHECKCTRL   0x0004
 
#define IPHK_SKIPTHISKEY   0x0010
 
#define DC_NOVISIBLE   0x0800
 
#define DC_NOSENDMSG   0x2000
 
#define DC_FRAME   0x8000
 
#define DC_DRAWCAPTIONMD   0x10000000
 
#define DC_REDRAWHUNGWND   0x20000000
 
#define DC_DRAWFRAMEMD   0x80000000
 
#define DFCS_MENUARROWUP   0x0008
 
#define DFCS_MENUARROWDOWN   0x0010
 
#define STARTF_INHERITDESKTOP   0x40000000
 
#define STARTF_SCREENSAVER   0x80000000
 
#define MOD_WINLOGON_SAS   0x8000
 
#define CW_USEDEFAULT16   ((short)0x8000)
 
#define SBRG_SCROLLBAR   0 /* the scrollbar itself */
 
#define SBRG_TOPRIGHTBTN   1 /* the top or right button */
 
#define SBRG_PAGEUPRIGHT   2 /* the page up or page right region */
 
#define SBRG_SCROLLBOX   3 /* the scroll box */
 
#define SBRG_PAGEDOWNLEFT   4 /* the page down or page left region */
 
#define SBRG_BOTTOMLEFTBTN   5 /* the bottom or left button */
 
#define DrawCaptionTemp   DrawCaptionTempA
 
#define MessageBoxTimeout   MessageBoxTimeoutA
 
#define UAH_HOOK_MESSAGE(uahowp, msg)   uahowp.MsgBitArray[msg/8] |= (1 << (msg % 8));
 
#define UAH_IS_MESSAGE_HOOKED(uahowp, msg)   (uahowp.MsgBitArray[msg/8] & (1 << (msg % 8)))
 
#define UAHOWP_MAX_SIZE   WM_USER/8
 

Typedefs

typedef struct
_BALLOON_HARD_ERROR_DATA 
BALLOON_HARD_ERROR_DATA
 
typedef struct
_BALLOON_HARD_ERROR_DATA
PBALLOON_HARD_ERROR_DATA
 
typedef struct _MSGBOXDATA MSGBOXDATA
 
typedef struct _MSGBOXDATAPMSGBOXDATA
 
typedef struct _MSGBOXDATALPMSGBOXDATA
 
typedef LRESULT(CALLBACKWNDPROC_OWP )(HWND, UINT, WPARAM, LPARAM, ULONG_PTR, PDWORD)
 
typedef int(WINAPISETWINDOWRGN )(HWND hWnd, HRGN hRgn, BOOL bRedraw)
 
typedef BOOL(WINAPIGETSCROLLINFO )(HWND, INT, LPSCROLLINFO)
 
typedef INT(WINAPISETSCROLLINFO )(HWND, int, LPCSCROLLINFO, BOOL)
 
typedef BOOL(WINAPIENABLESCROLLBAR )(HWND, UINT, UINT)
 
typedef BOOL(WINAPIADJUSTWINDOWRECTEX )(LPRECT, DWORD, BOOL, DWORD)
 
typedef int(WINAPIGETSYSTEMMETRICS )(int)
 
typedef BOOL(WINAPISYSTEMPARAMETERSINFOA )(UINT, UINT, PVOID, UINT)
 
typedef BOOL(WINAPISYSTEMPARAMETERSINFOW )(UINT, UINT, PVOID, UINT)
 
typedef BOOL(WINAPIFORCERESETUSERAPIHOOK )(HINSTANCE)
 
typedef BOOL(WINAPIDRAWFRAMECONTROL )(HDC, LPRECT, UINT, UINT)
 
typedef BOOL(WINAPIDRAWCAPTION )(HWND, HDC, LPCRECT, UINT)
 
typedef BOOL(WINAPIMDIREDRAWFRAME )(HWND, DWORD)
 
typedef DWORD(WINAPIGETREALWINDOWOWNER )(HWND)
 
typedef struct _UAHOWP UAHOWP
 
typedef struct _UAHOWPPUAHOWP
 
typedef struct tagUSERAPIHOOK USERAPIHOOK
 
typedef struct tagUSERAPIHOOKPUSERAPIHOOK
 
typedef enum _UAPIHK UAPIHK
 
typedef enum _UAPIHKPUAPIHK
 
typedef BOOL(CALLBACKUSERAPIHOOKPROC )(UAPIHK State, PUSERAPIHOOK puah)
 
typedef struct _USERAPIHOOKINFO USERAPIHOOKINFO
 
typedef struct _USERAPIHOOKINFOPUSERAPIHOOKINFO
 

Enumerations

enum  _UAPIHK { uahLoadInit, uahStop, uahShutdown }
 

Functions

BOOL WINAPI UpdatePerUserSystemParameters (DWORD dwReserved, BOOL bEnable)
 
BOOL WINAPI SetLogonNotifyWindow (HWND Wnd)
 
BOOL WINAPI KillSystemTimer (HWND, UINT_PTR)
 
UINT_PTR WINAPI SetSystemTimer (HWND, UINT_PTR, UINT, TIMERPROC)
 
DWORD_PTR WINAPI SetSysColorsTemp (const COLORREF *, const HBRUSH *, DWORD_PTR)
 
BOOL WINAPI SetDeskWallPaper (LPCSTR)
 
VOID WINAPI ScrollChildren (HWND, UINT, WPARAM, LPARAM)
 
void WINAPI CalcChildScroll (HWND, INT)
 
BOOL WINAPI RegisterLogonProcess (DWORD, BOOL)
 
DWORD WINAPI GetAppCompatFlags (HTASK hTask)
 
DWORD WINAPI GetAppCompatFlags2 (HTASK hTask)
 
LONG WINAPI CsrBroadcastSystemMessageExW (DWORD dwflags, LPDWORD lpdwRecipients, UINT uiMessage, WPARAM wParam, LPARAM lParam, PBSMINFO pBSMInfo)
 
BOOL WINAPI CliImmSetHotKey (DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKl)
 
HWND WINAPI SetTaskmanWindow (HWND)
 
HWND WINAPI GetTaskmanWindow (VOID)
 
HWND WINAPI GetProgmanWindow (VOID)
 
BOOL WINAPI SetShellWindow (HWND)
 
BOOL WINAPI SetShellWindowEx (HWND, HWND)
 
BOOL WINAPI DrawCaptionTempA (HWND, HDC, const RECT *, HFONT, HICON, LPCSTR, UINT)
 
BOOL WINAPI DrawCaptionTempW (HWND, HDC, const RECT *, HFONT, HICON, LPCWSTR, UINT)
 
BOOL WINAPI PaintMenuBar (HWND hWnd, HDC hDC, ULONG left, ULONG right, ULONG top, BOOL bActive)
 
 C_ASSERT (sizeof(MSGBOXDATA)==0x48)
 
int WINAPI SoftModalMessageBox (IN LPMSGBOXDATA lpMsgBoxData)
 
int WINAPI MessageBoxTimeoutA (IN HWND hWnd, IN LPCSTR lpText, IN LPCSTR lpCaption, IN UINT uType, IN WORD wLanguageId, IN DWORD dwTimeout)
 
int WINAPI MessageBoxTimeoutW (IN HWND hWnd, IN LPCWSTR lpText, IN LPCWSTR lpCaption, IN UINT uType, IN WORD wLanguageId, IN DWORD dwTimeout)
 
LPCWSTR WINAPI MB_GetString (IN UINT wBtn)
 
BOOL WINAPI RegisterUserApiHook (HINSTANCE hInstance, USERAPIHOOKPROC CallbackFunc)
 
BOOL WINAPI UnregisterUserApiHook (VOID)
 

Macro Definition Documentation

#define CW_USEDEFAULT16   ((short)0x8000)

Definition at line 167 of file undocuser.h.

Referenced by CreateWindowExA(), CreateWindowExW(), and DIALOG_CreateIndirect().

#define DC_DRAWCAPTIONMD   0x10000000

Definition at line 149 of file undocuser.h.

Referenced by NtUserDrawCaptionTemp(), and UserPaintCaption().

#define DC_DRAWFRAMEMD   0x80000000

Definition at line 151 of file undocuser.h.

Referenced by NtUserDrawCaptionTemp().

#define DC_FRAME   0x8000

Definition at line 147 of file undocuser.h.

Referenced by IntDefWindowProc(), NC_DoNCActive(), NC_DoNCPaint(), and UserDrawCaptionBar().

#define DC_NOSENDMSG   0x2000

Definition at line 146 of file undocuser.h.

Referenced by NC_DoNCPaint(), and PaintSuspendedWindow().

#define DC_NOVISIBLE   0x0800

Definition at line 145 of file undocuser.h.

Referenced by UserDrawCaptionBar().

#define DC_REDRAWHUNGWND   0x20000000

Definition at line 150 of file undocuser.h.

Referenced by NC_DoNCPaint().

#define DCX_KEEPLAYOUT   0x40000000

Definition at line 67 of file undocuser.h.

Referenced by UserGetDCEx().

#define DCX_PROCESSOWNED   0x80000000

Definition at line 68 of file undocuser.h.

Referenced by UserGetDCEx().

#define DCX_USESTYLE   0x00010000

Definition at line 65 of file undocuser.h.

#define DFCS_MENUARROWDOWN   0x0010

Definition at line 157 of file undocuser.h.

Referenced by MENU_DrawScrollArrows(), and UITOOLS95_DrawFrameMenu().

#define DFCS_MENUARROWUP   0x0008

Definition at line 156 of file undocuser.h.

Referenced by MENU_DrawScrollArrows(), and UITOOLS95_DrawFrameMenu().

#define DrawCaptionTemp   DrawCaptionTempA

Definition at line 207 of file undocuser.h.

#define ES_COMBO   0x200 /* Parent is a combobox */

Definition at line 16 of file undocuser.h.

#define EWX_CALLER_SYSTEM   0x0100

Definition at line 126 of file undocuser.h.

Referenced by UserInitiateShutdown().

#define EWX_CALLER_WINLOGON   0x0200
#define EWX_CALLER_WINLOGON_LOGOFF   0x1000

Definition at line 128 of file undocuser.h.

Referenced by ThreadShutdownNotify().

#define EWX_NONOTIFY   0x10000

Definition at line 133 of file undocuser.h.

Referenced by KillComProcesses(), and NotifyLogon().

#define EWX_NOTIFY   0x8000

Definition at line 132 of file undocuser.h.

#define EWX_SHUTDOWN_CANCELED   0x0080

Definition at line 125 of file undocuser.h.

Referenced by NotifyLogon(), and UserEndShutdown().

#define ID_TME_TIMER   (0xFFFA)

Definition at line 79 of file undocuser.h.

#define IDCARETTIMER   (0xffff)
#define IPHK_CHECKCTRL   0x0004

Definition at line 139 of file undocuser.h.

#define IPHK_HOTKEY   0x0001

Definition at line 137 of file undocuser.h.

Referenced by co_IntProcessKeyboardMessage().

#define IPHK_PROCESSBYIME   0x0002

Definition at line 138 of file undocuser.h.

Referenced by co_IntProcessKeyboardMessage().

#define IPHK_SKIPTHISKEY   0x0010

Definition at line 140 of file undocuser.h.

Referenced by co_IntProcessKeyboardMessage().

#define LB_CARETOFF   0x000001a4
#define LB_CARETON   0x000001a3

Definition at line 50 of file undocuser.h.

Referenced by CBDropDown(), COMBO_SetFocus(), LISTBOX_WindowProc(), and ListBoxWndProc_common().

#define LN_LOCK_WORKSTATION   0x5

Definition at line 116 of file undocuser.h.

Referenced by NtUserLockWorkStation(), and SASWindowProc().

#define LN_LOGOFF   0x0

Definition at line 113 of file undocuser.h.

Referenced by NotifyLogon(), and SASWindowProc().

#define LN_LOGOFF_CANCELED   0xB

Definition at line 120 of file undocuser.h.

Referenced by NotifyLogon(), and SASWindowProc().

#define LN_SHELL_EXITED   0x2

Definition at line 114 of file undocuser.h.

Referenced by ExitThreadCallback(), and SASWindowProc().

#define LN_START_SCREENSAVE   0xA

Definition at line 119 of file undocuser.h.

Referenced by DefWndHandleSysCommand(), DoTheScreenSaver(), and SASWindowProc().

#define LN_START_TASK_MANAGER   0x4

Definition at line 115 of file undocuser.h.

#define LN_UNLOCK_WORKSTATION   0x6

Definition at line 117 of file undocuser.h.

#define MCS_ENDSESSION   1
#define MCS_QUERYENDSESSION   2
#define MCSR_DONOTSHUTDOWN   3

Definition at line 108 of file undocuser.h.

Referenced by IntClientShutdown(), and SendClientShutdown().

#define MCSR_GOODFORSHUTDOWN   1

Definition at line 106 of file undocuser.h.

Referenced by IntClientShutdown(), and SendClientShutdown().

#define MCSR_SHUTDOWNFINISHED   2

Definition at line 107 of file undocuser.h.

Referenced by IntClientShutdown(), and SendClientShutdown().

#define MessageBoxTimeout   MessageBoxTimeoutA

Definition at line 293 of file undocuser.h.

#define MN_SETHMENU   0x000001e0

Definition at line 52 of file undocuser.h.

Referenced by PopupMenuWndProc(), PopupMenuWndProcA(), and PopupMenuWndProcW().

#define MOD_WINLOGON_SAS   0x8000

Definition at line 165 of file undocuser.h.

#define NUCWE_ANSI   0x00000001

Definition at line 74 of file undocuser.h.

Referenced by CreateWindowExA(), and User32CreateWindowEx().

#define NUCWE_SIDEBYSIDE   0x40000000

Definition at line 75 of file undocuser.h.

#define QS_SMRESULT   0x8000 /* see "Undoc. Windows" */
#define QS_SYSEVENT   (QS_EVENT|QS_SENDMESSAGE)

Definition at line 96 of file undocuser.h.

#define SBRG_BOTTOMLEFTBTN   5 /* the bottom or left button */

Definition at line 174 of file undocuser.h.

#define SBRG_PAGEDOWNLEFT   4 /* the page down or page left region */

Definition at line 173 of file undocuser.h.

#define SBRG_PAGEUPRIGHT   2 /* the page up or page right region */

Definition at line 171 of file undocuser.h.

#define SBRG_SCROLLBAR   0 /* the scrollbar itself */

Definition at line 169 of file undocuser.h.

#define SBRG_SCROLLBOX   3 /* the scroll box */

Definition at line 172 of file undocuser.h.

#define SBRG_TOPRIGHTBTN   1 /* the top or right button */

Definition at line 170 of file undocuser.h.

#define SIF_PREVIOUSPOS   4096

Definition at line 87 of file undocuser.h.

Referenced by co_IntSetScrollInfo(), ScrollBarWndProc_common(), and SetScrollPos().

#define STARTF_INHERITDESKTOP   0x40000000

Definition at line 162 of file undocuser.h.

Referenced by InitThreadCallback(), RunNextJob(), and ScmStartUserModeService().

#define STARTF_SCREENSAVER   0x80000000

Definition at line 163 of file undocuser.h.

Referenced by StartScreenSaver(), and UserProcessCreate().

#define SW_SCROLLWNDDCE   0x8000

Definition at line 90 of file undocuser.h.

Referenced by IntScrollWindow(), IntScrollWindowEx(), and ScrollWindow().

#define SWP_NOCLIENTMOVE   0x1000

Definition at line 83 of file undocuser.h.

#define SWP_NOCLIENTSIZE   0x0800

Definition at line 82 of file undocuser.h.

#define SWP_STATECHANGED   0x8000

Definition at line 84 of file undocuser.h.

#define TPM_SYSTEM_MENU   0x00000200

Definition at line 71 of file undocuser.h.

Referenced by IntDefWindowProc(), MENU_InitPopup(), and User32DefWindowProc().

#define UAH_HOOK_MESSAGE (   uahowp,
  msg 
)    uahowp.MsgBitArray[msg/8] |= (1 << (msg % 8));

Definition at line 324 of file undocuser.h.

Referenced by ThemeInitApiHook().

#define UAH_IS_MESSAGE_HOOKED (   uahowp,
  msg 
)    (uahowp.MsgBitArray[msg/8] & (1 << (msg % 8)))

Definition at line 325 of file undocuser.h.

#define UAHOWP_MAX_SIZE   WM_USER/8

Definition at line 326 of file undocuser.h.

Referenced by ThemeInitApiHook().

#define WC_DESKTOP   (MAKEINTATOM(0x8001))

Definition at line 10 of file undocuser.h.

Referenced by IntCreateDesktop().

#define WC_DIALOG   (MAKEINTATOM(0x8002))
#define WC_ICONTITLE   (MAKEINTATOM(0x8004))

Definition at line 13 of file undocuser.h.

#define WC_MENU   (MAKEINTATOM(0x8000))

Definition at line 9 of file undocuser.h.

Referenced by MENU_InitPopup().

#define WC_SWITCH   (MAKEINTATOM(0x8003))

Definition at line 12 of file undocuser.h.

Referenced by CreateSwitcherWindow().

#define WM_ALTTABACTIVE   0x00000029

Definition at line 32 of file undocuser.h.

#define WM_BEGINDRAG   0x0000022C

Definition at line 55 of file undocuser.h.

Referenced by LISTBOX_HandleLButtonDown().

#define WM_CBLOSTTEXTFOCUS   0x00000167

Definition at line 49 of file undocuser.h.

Referenced by ComboWndProc_common(), and EDIT_WM_KillFocus().

#define WM_CBT   0x000003FF

Definition at line 61 of file undocuser.h.

Referenced by IntDefWindowProc().

#define WM_CLIENTSHUTDOWN   0x0000003B

Definition at line 35 of file undocuser.h.

Referenced by IntDefWindowProc(), SendClientShutdown(), and User32DefWindowProc().

#define WM_COPYGLOBALDATA   0x00000049

Definition at line 36 of file undocuser.h.

Referenced by PostMessageA(), and PostMessageW().

#define WM_DRAGLOOP   0x0000022D

Definition at line 56 of file undocuser.h.

#define WM_DRAGMOVE   0x0000022F

Definition at line 58 of file undocuser.h.

#define WM_DRAGSELECT   0x0000022E

Definition at line 57 of file undocuser.h.

#define WM_DROPOBJECT   0x0000022A

Definition at line 53 of file undocuser.h.

#define WM_ISACTIVEICON   0x00000035

Definition at line 33 of file undocuser.h.

Referenced by IconTitleWndProc(), and User32DefWindowProc().

#define WM_KEYF1   0x0000004D

Definition at line 38 of file undocuser.h.

#define WM_KLUDGEMINRECT   0x0000008B

Definition at line 39 of file undocuser.h.

#define WM_LBTRACKPOINT   0x00000131

Definition at line 48 of file undocuser.h.

#define WM_NCUAHDRAWCAPTION   0x000000AE
#define WM_NCUAHDRAWFRAME   0x000000AF

Definition at line 46 of file undocuser.h.

Referenced by IntDefWindowProc(), ThemeInitApiHook(), ThemeWndProc(), and User32DefWindowProc().

#define WM_POPUPSYSTEMMENU   0x00000313

Definition at line 59 of file undocuser.h.

Referenced by CTaskSwitchWnd::HandleTaskItemRightClick(), and User32DefWindowProc().

#define WM_QUERYDROPOBJECT   0x0000022B

Definition at line 54 of file undocuser.h.

Referenced by User32DefWindowProc().

#define WM_QUERYPARKICON   0x00000036

Definition at line 34 of file undocuser.h.

#define WM_SETVISIBLE   0x00000009
#define WM_SYSTIMER   0x00000118

Definition at line 47 of file undocuser.h.

#define WM_UAHDRAWITEM   0x00000092

Definition at line 41 of file undocuser.h.

#define WM_UAHDRAWMENU   0x00000091

Definition at line 40 of file undocuser.h.

#define WM_UAHDRAWMENUNC   0x00000095

Definition at line 44 of file undocuser.h.

#define WM_UAHINIT   0x0000031b

Definition at line 60 of file undocuser.h.

Referenced by ThemeInitApiHook().

#define WM_UAHINITMENU   0x00000093

Definition at line 42 of file undocuser.h.

#define WM_UAHMEASUREITEM   0x00000094

Definition at line 43 of file undocuser.h.

#define WS_EX_DRAGDETECT   0x00000002

Definition at line 21 of file undocuser.h.

Referenced by LISTBOX_HandleLButtonDown().

#define WS_EX_FORCELEGACYRESIZENCMETR   0x00800000

Definition at line 23 of file undocuser.h.

#define WS_EX_MAKEVISIBLEWHENUNGHOSTED   0x00000800

Definition at line 22 of file undocuser.h.

#define WS_EX_REDIRECTED   0x20000000

Definition at line 25 of file undocuser.h.

Referenced by IntIntersectWithParents().

#define WS_EX_SETANSICREATOR   0x80000000

Definition at line 28 of file undocuser.h.

Referenced by IntCreateWindow(), and User32CreateWindowEx().

#define WS_EX_UISTATEACTIVE   0x04000000

Definition at line 24 of file undocuser.h.

#define WS_EX_UISTATEFOCUSRECTHIDDEN   0x80000000

Definition at line 27 of file undocuser.h.

#define WS_EX_UISTATEKBACCELHIDDEN   0x40000000

Definition at line 26 of file undocuser.h.

#define WS_MAXIMIZED   WS_MAXIMIZE

Definition at line 17 of file undocuser.h.

Typedef Documentation

typedef BOOL(WINAPI * ADJUSTWINDOWRECTEX)(LPRECT, DWORD, BOOL, DWORD)

Definition at line 308 of file undocuser.h.

typedef BOOL(WINAPI * DRAWCAPTION)(HWND, HDC, LPCRECT, UINT)

Definition at line 314 of file undocuser.h.

typedef BOOL(WINAPI * DRAWFRAMECONTROL)(HDC, LPRECT, UINT, UINT)

Definition at line 313 of file undocuser.h.

typedef BOOL(WINAPI * ENABLESCROLLBAR)(HWND, UINT, UINT)

Definition at line 307 of file undocuser.h.

typedef BOOL(WINAPI * FORCERESETUSERAPIHOOK)(HINSTANCE)

Definition at line 312 of file undocuser.h.

typedef DWORD(WINAPI * GETREALWINDOWOWNER)(HWND)

Definition at line 316 of file undocuser.h.

typedef BOOL(WINAPI * GETSCROLLINFO)(HWND, INT, LPSCROLLINFO)

Definition at line 305 of file undocuser.h.

typedef int(WINAPI * GETSYSTEMMETRICS)(int)

Definition at line 309 of file undocuser.h.

typedef BOOL(WINAPI * MDIREDRAWFRAME)(HWND, DWORD)

Definition at line 315 of file undocuser.h.

typedef struct _UAHOWP * PUAHOWP
typedef enum _UAPIHK * PUAPIHK
typedef INT(WINAPI * SETSCROLLINFO)(HWND, int, LPCSCROLLINFO, BOOL)

Definition at line 306 of file undocuser.h.

typedef int(WINAPI * SETWINDOWRGN)(HWND hWnd, HRGN hRgn, BOOL bRedraw)

Definition at line 304 of file undocuser.h.

typedef BOOL(WINAPI * SYSTEMPARAMETERSINFOA)(UINT, UINT, PVOID, UINT)

Definition at line 310 of file undocuser.h.

typedef BOOL(WINAPI * SYSTEMPARAMETERSINFOW)(UINT, UINT, PVOID, UINT)

Definition at line 311 of file undocuser.h.

typedef enum _UAPIHK UAPIHK
typedef BOOL(CALLBACK * USERAPIHOOKPROC)(UAPIHK State, PUSERAPIHOOK puah)

Definition at line 362 of file undocuser.h.

typedef LRESULT(CALLBACK * WNDPROC_OWP)(HWND, UINT, WPARAM, LPARAM, ULONG_PTR, PDWORD)

Definition at line 303 of file undocuser.h.

Enumeration Type Documentation

Enumerator
uahLoadInit 
uahStop 
uahShutdown 

Definition at line 355 of file undocuser.h.

356 {
357  uahLoadInit,
358  uahStop,
360 } UAPIHK, *PUAPIHK;
enum _UAPIHK UAPIHK
enum _UAPIHK * PUAPIHK

Function Documentation

C_ASSERT ( sizeof(MSGBOXDATA = =0x48)
void WINAPI CalcChildScroll ( HWND  ,
INT   
)

Definition at line 1804 of file mdi.c.

Referenced by MDIClientWndProc_common(), and ScrollChildren().

1805 {
1806  SCROLLINFO info;
1807  RECT childRect, clientRect;
1808  HWND *list;
1809  DWORD style;
1810  WINDOWINFO WindowInfo;
1811 
1812  GetClientRect( hwnd, &clientRect );
1813  SetRectEmpty( &childRect );
1814 
1815  /* The rectangle returned by GetClientRect always has 0,0 as top left
1816  * because it is in client coordinates. The rectangles returned by
1817  * GetWindowRect are in screen coordinates to make this complicated.
1818  *
1819  * Apparently (in ReactOS at least) the rcClient returned by GetWindowInfo
1820  * is in screen coordinates too.
1821  */
1822  WindowInfo.cbSize = sizeof(WindowInfo);
1823  if (!GetWindowInfo(hwnd, &WindowInfo))
1824  {
1825  ERR("Can't get window info\n");
1826  return;
1827  }
1828 
1829  TRACE("CalcChildScroll 1\n");
1830  if ((list = WIN_ListChildren( hwnd )))
1831  {
1832  int i;
1833  for (i = 0; list[i]; i++)
1834  {
1835  style = GetWindowLongPtrW( list[i], GWL_STYLE );
1836  if (style & WS_MAXIMIZE)
1837  {
1838  HeapFree( GetProcessHeap(), 0, list );
1840  ERR("CalcChildScroll 2\n");
1841  return;
1842  }
1843  if (style & WS_VISIBLE)
1844  {
1845  RECT rect;
1846  GetWindowRect( list[i], &rect );
1847  OffsetRect(&rect, -WindowInfo.rcClient.left,
1848  -WindowInfo.rcClient.top);
1849  //WIN_GetRectangles( list[i], COORDS_PARENT, &rect, NULL );
1850  TRACE("CalcChildScroll L\n");
1851  UnionRect( &childRect, &rect, &childRect );
1852  }
1853  }
1854  HeapFree( GetProcessHeap(), 0, list );
1855  }
1856  UnionRect( &childRect, &clientRect, &childRect );
1857  TRACE("CalcChildScroll 3\n");
1858  /* set common info values */
1859  info.cbSize = sizeof(info);
1860  info.fMask = SIF_POS | SIF_RANGE | SIF_PAGE;
1861  info.nPos = 0;
1862 
1863  /* set the specific values and apply but only if window style allows */
1864  /* Note how we set nPos to 0 because we scroll the clients instead of
1865  * the window, and we set nPage to 1 bigger than the clientRect because
1866  * otherwise the scrollbar never disables. This causes a somewhat ugly
1867  * effect though while scrolling.
1868  */
1869  style = GetWindowLongW( hwnd, GWL_STYLE );
1870  switch( scroll )
1871  {
1872  case SB_BOTH:
1873  case SB_HORZ:
1874  if (style & (WS_HSCROLL | WS_VSCROLL))
1875  {
1876  info.nMin = childRect.left;
1877  info.nMax = childRect.right;
1878  info.nPage = 1 + clientRect.right - clientRect.left;
1879  //info.nMax = childRect.right - clientRect.right;
1880  //info.nPos = clientRect.left - childRect.left;
1881  SetScrollInfo(hwnd, SB_HORZ, &info, TRUE);
1882  }
1883  if (scroll == SB_HORZ) break;
1884  /* fall through */
1885  case SB_VERT:
1886  if (style & (WS_HSCROLL | WS_VSCROLL))
1887  {
1888  info.nMin = childRect.top;
1889  info.nMax = childRect.bottom;
1890  info.nPage = 1 + clientRect.bottom - clientRect.top;
1891  //info.nMax = childRect.bottom - clientRect.bottom;
1892  //info.nPos = clientRect.top - childRect.top;
1893  SetScrollInfo(hwnd, SB_VERT, &info, TRUE);
1894  }
1895  break;
1896  }
1897 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
UINT style
Definition: startmenu.cpp:1386
#define TRUE
Definition: types.h:120
DWORD cbSize
Definition: winuser.h:3708
#define SIF_RANGE
Definition: winuser.h:1221
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define SB_VERT
Definition: winuser.h:553
#define SB_HORZ
Definition: winuser.h:552
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
LONG top
Definition: windef.h:297
HANDLE HWND
Definition: compat.h:13
#define GetWindowLongPtrW
Definition: winuser.h:4698
LONG left
Definition: windef.h:296
LONG right
Definition: windef.h:298
#define SIF_PAGE
Definition: winuser.h:1219
& rect
Definition: startmenu.cpp:1413
DWORD DWORD
Definition: winlogon.h:84
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define FALSE
Definition: types.h:117
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
BOOL WINAPI UnionRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define WS_HSCROLL
Definition: pedump.c:628
#define SB_BOTH
Definition: winuser.h:555
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
HWND * WIN_ListChildren(HWND hWndparent)
Definition: mdi.c:140
#define SIF_POS
Definition: winuser.h:1220
#define ERR(fmt,...)
Definition: debug.h:109
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
const XML_Char XML_Encoding * info
Definition: expat.h:530
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
#define WS_VSCROLL
Definition: pedump.c:627
LONG bottom
Definition: windef.h:299
#define list
Definition: rosglue.h:35
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
RECT rcClient
Definition: winuser.h:3710
#define WS_VISIBLE
Definition: pedump.c:620
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define HeapFree(x, y, z)
Definition: compat.h:394
#define WS_MAXIMIZE
Definition: pedump.c:623
BOOL WINAPI CliImmSetHotKey ( DWORD  dwID,
UINT  uModifiers,
UINT  uVirtualKey,
HKL  hKl 
)

Definition at line 345 of file imm.c.

346 {
348  return FALSE;
349 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
LONG WINAPI CsrBroadcastSystemMessageExW ( DWORD  dwflags,
LPDWORD  lpdwRecipients,
UINT  uiMessage,
WPARAM  wParam,
LPARAM  lParam,
PBSMINFO  pBSMInfo 
)

Definition at line 240 of file stubs.c.

247 {
249  return FALSE;
250 }
#define UNIMPLEMENTED
Definition: stubs.c:20
#define FALSE
Definition: types.h:117
BOOL WINAPI DrawCaptionTempA ( HWND  ,
HDC  ,
const RECT ,
HFONT  ,
HICON  ,
LPCSTR  ,
UINT   
)

Definition at line 222 of file nonclient.c.

231 {
232  LPWSTR strW;
233  INT len;
234  BOOL ret = FALSE;
235 
236  if (!(uFlags & DC_TEXT) || !str)
238 
239  len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
240  if ((strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
241  {
242  MultiByteToWideChar(CP_ACP, 0, str, -1, strW, len );
243  ret = DrawCaptionTempW(hwnd, hdc, rect, hFont, hIcon, strW, uFlags);
244  HeapFree(GetProcessHeap(), 0, strW);
245  }
246  return ret;
247 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define CP_ACP
Definition: compat.h:99
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
HFONT hFont
Definition: main.c:53
BOOL WINAPI DrawCaptionTempW(HWND hWnd, HDC hDC, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags)
Definition: nonclient.c:202
#define FALSE
Definition: types.h:117
WCHAR strW[12]
Definition: clipboard.c:2029
HDC hdc
Definition: msvc.h:53
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
int ret
GLenum GLsizei len
Definition: glext.h:6722
HICON hIcon
Definition: msconfig.c:44
#define MultiByteToWideChar
Definition: compat.h:100
DWORD UINT uFlags
Definition: wglext.h:734
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
#define DC_TEXT
Definition: winuser.h:430
BOOL WINAPI DrawCaptionTempW ( HWND  ,
HDC  ,
const RECT ,
HFONT  ,
HICON  ,
LPCWSTR  ,
UINT   
)

Definition at line 202 of file nonclient.c.

Referenced by DrawCaptionTempA().

211 {
212  UNICODE_STRING Text = {0};
213  RtlInitUnicodeString(&Text, str);
214  return NtUserDrawCaptionTemp(hWnd, hDC, rect, hFont, hIcon, &Text, uFlags);
215 }
HWND hWnd
Definition: settings.c:17
& rect
Definition: startmenu.cpp:1413
HFONT hFont
Definition: main.c:53
const WCHAR * str
BOOL NTAPI NtUserDrawCaptionTemp(HWND hWnd, HDC hDC, LPCRECT lpRc, HFONT hFont, HICON hIcon, const PUNICODE_STRING str, UINT uFlags)
Definition: painting.c:2364
HDC hDC
Definition: wglext.h:521
HICON hIcon
Definition: msconfig.c:44
DWORD UINT uFlags
Definition: wglext.h:734
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
char * Text
Definition: combotst.c:136
DWORD WINAPI GetAppCompatFlags ( HTASK  hTask)

Definition at line 51 of file stubs.c.

52 {
54 
55  return pci->dwCompatFlags;
56 }
#define GetWin32ClientInfo()
Definition: ntuser.h:320
DWORD dwCompatFlags
Definition: ntuser.h:290
DWORD WINAPI GetAppCompatFlags2 ( HTASK  hTask)

Definition at line 63 of file stubs.c.

64 {
66 
67  return pci->dwCompatFlags2;
68 }
#define GetWin32ClientInfo()
Definition: ntuser.h:320
DWORD dwCompatFlags2
Definition: ntuser.h:291
HWND WINAPI GetProgmanWindow ( VOID  )

Definition at line 1893 of file window.c.

1894 {
1896 }
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
Definition: misc.c:231
HANDLE HWND
Definition: compat.h:13
HWND WINAPI GetTaskmanWindow ( VOID  )

Definition at line 1902 of file window.c.

Referenced by UserpShowInformationBalloon().

1903 {
1905 }
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
Definition: misc.c:231
HANDLE HWND
Definition: compat.h:13
BOOL WINAPI KillSystemTimer ( HWND  ,
UINT_PTR   
)

Definition at line 35 of file timer.c.

36 {
37  return NtUserxKillSystemTimer(hWnd, IDEvent);
38 }
HWND hWnd
Definition: settings.c:17
EXTINLINE BOOL NtUserxKillSystemTimer(HWND hWnd, UINT_PTR IDEvent)
Definition: ntwrapper.h:711
LPCWSTR WINAPI MB_GetString ( IN UINT  wBtn)

Definition at line 1345 of file messagebox.c.

Referenced by MessageBoxTimeoutIndirectW().

1347 {
1348  static BOOL bCached = FALSE;
1349  static MBSTRING MBStrings[MAX_MB_STRINGS]; // FIXME: Use gpsi->MBStrings when this is loaded by Win32k!
1350 
1351  //
1352  // FIXME - TODO: The gpsi->MBStrings[] array should be loaded by win32k!
1353  //
1355  if (!bCached)
1356  {
1357  UINT i;
1358  for (i = 0; i < MAX_MB_STRINGS; ++i)
1359  {
1360  /*gpsi->*/MBStrings[i].uID = IDOK + i;
1361  /*gpsi->*/MBStrings[i].uStr = IDS_OK + i; // See user32/include/resource.h
1363  /*gpsi->*/MBStrings[i].uStr,
1364  /*gpsi->*/MBStrings[i].szName,
1365  ARRAYSIZE(/*gpsi->*/MBStrings[i].szName));
1366  }
1367  bCached = TRUE;
1368  }
1369 
1370  /*
1371  * The allowable IDs are between "IDOK - 1" (0) and "IDCONTINUE - 1" (10) inclusive.
1372  * See psdk/winuser.h and user32/include/resource.h .
1373  */
1374  if (wBtn > IDCONTINUE - 1)
1375  return NULL;
1376 
1377  return /*gpsi->*/MBStrings[wBtn].szName;
1378 }
WCHAR szName[16]
Definition: ntuser.h:938
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define MAX_MB_STRINGS
Definition: ntuser.h:907
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HINSTANCE User32Instance
Definition: dllmain.c:10
UINT uStr
Definition: ntuser.h:940
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
unsigned int BOOL
Definition: ntddk_ex.h:94
UINT uID
Definition: ntuser.h:939
#define IDS_OK
Definition: resource.h:19
#define IDCONTINUE
Definition: vfdguiut.c:42
unsigned int UINT
Definition: ndis.h:50
static const WCHAR szName[]
Definition: msipriv.h:1194
int WINAPI MessageBoxTimeoutA ( IN HWND  hWnd,
IN LPCSTR  lpText,
IN LPCSTR  lpCaption,
IN UINT  uType,
IN WORD  wLanguageId,
IN DWORD  dwTimeout 
)

Definition at line 1250 of file messagebox.c.

1257 {
1258  MSGBOXPARAMSW msgboxW;
1259  UNICODE_STRING textW, captionW;
1260  int ret;
1261 
1262  if (!IS_INTRESOURCE(lpText))
1263  RtlCreateUnicodeStringFromAsciiz(&textW, (PCSZ)lpText);
1264  else
1265  textW.Buffer = (LPWSTR)lpText;
1266 
1267  if (!IS_INTRESOURCE(lpCaption))
1268  RtlCreateUnicodeStringFromAsciiz(&captionW, (PCSZ)lpCaption);
1269  else
1270  captionW.Buffer = (LPWSTR)lpCaption;
1271 
1272  msgboxW.cbSize = sizeof(msgboxW);
1273  msgboxW.hwndOwner = hWnd;
1274  msgboxW.hInstance = 0;
1275  msgboxW.lpszText = textW.Buffer;
1276  msgboxW.lpszCaption = captionW.Buffer;
1277  msgboxW.dwStyle = uType;
1278  msgboxW.lpszIcon = NULL;
1279  msgboxW.dwContextHelpId = 0;
1280  msgboxW.lpfnMsgBoxCallback = NULL;
1281  msgboxW.dwLanguageId = wLanguageId;
1282 
1283  ret = MessageBoxTimeoutIndirectW(&msgboxW, (UINT)dwTimeout);
1284 
1285  if (!IS_INTRESOURCE(textW.Buffer))
1286  RtlFreeUnicodeString(&textW);
1287 
1288  if (!IS_INTRESOURCE(captionW.Buffer))
1289  RtlFreeUnicodeString(&captionW);
1290 
1291  return ret;
1292 }
int UINT uType
Definition: wglext.h:470
CONST char * PCSZ
Definition: umtypes.h:125
DWORD dwLanguageId
Definition: winuser.h:3287
HWND hWnd
Definition: settings.c:17
LPCWSTR lpszText
Definition: winuser.h:3281
LPCWSTR lpszIcon
Definition: winuser.h:3284
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszCaption
Definition: winuser.h:3282
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
DWORD_PTR dwContextHelpId
Definition: winuser.h:3285
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
HWND hwndOwner
Definition: winuser.h:3279
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
int ret
HINSTANCE hInstance
Definition: winuser.h:3280
static int MessageBoxTimeoutIndirectW(CONST MSGBOXPARAMSW *lpMsgBoxParams, UINT dwTimeout)
Definition: messagebox.c:449
static const WCHAR textW[]
Definition: itemdlg.c:1559
MSGBOXCALLBACK lpfnMsgBoxCallback
Definition: winuser.h:3286
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6079
unsigned int UINT
Definition: ndis.h:50
WCHAR * LPWSTR
Definition: xmlstorage.h:184
DWORD dwStyle
Definition: winuser.h:3283
int WINAPI MessageBoxTimeoutW ( IN HWND  hWnd,
IN LPCWSTR  lpText,
IN LPCWSTR  lpCaption,
IN UINT  uType,
IN WORD  wLanguageId,
IN DWORD  dwTimeout 
)

Definition at line 1299 of file messagebox.c.

1306 {
1307  MSGBOXPARAMSW msgbox;
1308 
1309  msgbox.cbSize = sizeof(msgbox);
1310  msgbox.hwndOwner = hWnd;
1311  msgbox.hInstance = 0;
1312  msgbox.lpszText = lpText;
1313  msgbox.lpszCaption = lpCaption;
1314  msgbox.dwStyle = uType;
1315  msgbox.lpszIcon = NULL;
1316  msgbox.dwContextHelpId = 0;
1317  msgbox.lpfnMsgBoxCallback = NULL;
1318  msgbox.dwLanguageId = wLanguageId;
1319 
1320  return MessageBoxTimeoutIndirectW(&msgbox, (UINT)dwTimeout);
1321 }
int UINT uType
Definition: wglext.h:470
DWORD dwLanguageId
Definition: winuser.h:3287
HWND hWnd
Definition: settings.c:17
LPCWSTR lpszText
Definition: winuser.h:3281
LPCWSTR lpszIcon
Definition: winuser.h:3284
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszCaption
Definition: winuser.h:3282
DWORD_PTR dwContextHelpId
Definition: winuser.h:3285
HWND hwndOwner
Definition: winuser.h:3279
HINSTANCE hInstance
Definition: winuser.h:3280
static int MessageBoxTimeoutIndirectW(CONST MSGBOXPARAMSW *lpMsgBoxParams, UINT dwTimeout)
Definition: messagebox.c:449
MSGBOXCALLBACK lpfnMsgBoxCallback
Definition: winuser.h:3286
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6079
unsigned int UINT
Definition: ndis.h:50
DWORD dwStyle
Definition: winuser.h:3283
BOOL WINAPI PaintMenuBar ( HWND  hWnd,
HDC  hDC,
ULONG  left,
ULONG  right,
ULONG  top,
BOOL  bActive 
)

Referenced by ThemeDrawMenuBar().

BOOL WINAPI RegisterLogonProcess ( DWORD  ,
BOOL   
)

Definition at line 43 of file logon.c.

45 {
46  gfLogonProcess = NtUserxRegisterLogonProcess(dwProcessId, bRegister);
47 
48  if (gfLogonProcess)
49  {
50  USER_API_MESSAGE ApiMessage;
51  PUSER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest = &ApiMessage.Data.RegisterLogonProcessRequest;
52 
53  RegisterLogonProcessRequest->ProcessId = dwProcessId;
54  RegisterLogonProcessRequest->Register = bRegister;
55 
57  NULL,
59  sizeof(*RegisterLogonProcessRequest));
60  if (!NT_SUCCESS(ApiMessage.Status))
61  {
62  ERR("Failed to register logon process with CSRSS\n");
63  UserSetLastNTError(ApiMessage.Status);
64  }
65  }
66 
67  return gfLogonProcess;
68 }
#define USERSRV_SERVERDLL_INDEX
Definition: winmsg.h:15
NTSTATUS NTAPI CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage, IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer OPTIONAL, IN CSR_API_NUMBER ApiNumber, IN ULONG DataLength)
Definition: connect.c:360
EXTINLINE BOOL NtUserxRegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
Definition: ntwrapper.h:831
NTSTATUS Status
Definition: csrmsg.h:112
smooth NULL
Definition: ftsmooth.c:416
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:24
USER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest
Definition: winmsg.h:101
union _USER_API_MESSAGE::@3383 Data
VOID WINAPI UserSetLastNTError(IN NTSTATUS Status)
Definition: misc.c:25
#define ERR(fmt,...)
Definition: debug.h:109
BOOLEAN gfLogonProcess
Definition: dllmain.c:18
BOOL WINAPI RegisterUserApiHook ( HINSTANCE  hInstance,
USERAPIHOOKPROC  CallbackFunc 
)
VOID WINAPI ScrollChildren ( HWND  ,
UINT  ,
WPARAM  ,
LPARAM   
)

Definition at line 1903 of file mdi.c.

Referenced by MDIClientWndProc_common().

1905 {
1906  INT newPos = -1;
1907  INT curPos, length, minPos, maxPos, shift;
1908  RECT rect;
1909 
1910  GetClientRect( hWnd, &rect );
1911 
1912  switch(uMsg)
1913  {
1914  case WM_HSCROLL:
1915  GetScrollRange(hWnd,SB_HORZ,&minPos,&maxPos);
1916  curPos = GetScrollPos(hWnd,SB_HORZ);
1917  length = (rect.right - rect.left) / 2;
1918  shift = GetSystemMetrics(SM_CYHSCROLL);
1919  break;
1920  case WM_VSCROLL:
1921  GetScrollRange(hWnd,SB_VERT,&minPos,&maxPos);
1922  curPos = GetScrollPos(hWnd,SB_VERT);
1923  length = (rect.bottom - rect.top) / 2;
1924  shift = GetSystemMetrics(SM_CXVSCROLL);
1925  break;
1926  default:
1927  return;
1928  }
1929 
1930  switch( wParam )
1931  {
1932  case SB_LINEUP:
1933  newPos = curPos - shift;
1934  break;
1935  case SB_LINEDOWN:
1936  newPos = curPos + shift;
1937  break;
1938  case SB_PAGEUP:
1939  newPos = curPos - length;
1940  break;
1941  case SB_PAGEDOWN:
1942  newPos = curPos + length;
1943  break;
1944 
1945  case SB_THUMBPOSITION:
1946  newPos = LOWORD(lParam);
1947  break;
1948 
1949  case SB_THUMBTRACK:
1950  return;
1951 
1952  case SB_TOP:
1953  newPos = minPos;
1954  break;
1955  case SB_BOTTOM:
1956  newPos = maxPos;
1957  break;
1958  case SB_ENDSCROLL:
1960  return;
1961  }
1962 
1963  if( newPos > maxPos )
1964  newPos = maxPos;
1965  else
1966  if( newPos < minPos )
1967  newPos = minPos;
1968 
1969  SetScrollPos(hWnd, (uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ , newPos, TRUE);
1970 
1971  if( uMsg == WM_VSCROLL )
1972  ScrollWindowEx(hWnd ,0 ,curPos - newPos, NULL, NULL, 0, NULL,
1974  else
1975  ScrollWindowEx(hWnd ,curPos - newPos, 0, NULL, NULL, 0, NULL,
1977 }
BOOL WINAPI GetScrollRange(_In_ HWND, _In_ int, _Out_ LPINT, _Out_ LPINT)
#define SB_PAGEDOWN
Definition: winuser.h:569
#define SB_PAGEUP
Definition: winuser.h:568
#define SM_CYHSCROLL
Definition: winuser.h:952
#define TRUE
Definition: types.h:120
#define shift
Definition: input.c:1668
#define SB_VERT
Definition: winuser.h:553
#define SB_HORZ
Definition: winuser.h:552
HWND hWnd
Definition: settings.c:17
UINT uMsg
Definition: precomp.h:45
LONG top
Definition: windef.h:297
LONG left
Definition: windef.h:296
LONG right
Definition: windef.h:298
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
#define SW_ERASE
Definition: winuser.h:2534
smooth NULL
Definition: ftsmooth.c:416
#define SB_THUMBPOSITION
Definition: winuser.h:572
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
#define SB_ENDSCROLL
Definition: winuser.h:574
#define SB_THUMBTRACK
Definition: winuser.h:573
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
UINT WPARAM wParam
Definition: precomp.h:45
int WINAPI GetScrollPos(_In_ HWND, _In_ int)
int WINAPI GetSystemMetrics(_In_ int)
void WINAPI CalcChildScroll(HWND hwnd, INT scroll)
Definition: mdi.c:1804
#define SW_INVALIDATE
Definition: winuser.h:2533
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SB_TOP
Definition: winuser.h:578
UINT WPARAM LPARAM lParam
Definition: precomp.h:45
#define SB_LINEDOWN
Definition: winuser.h:565
#define WM_HSCROLL
Definition: winuser.h:1719
#define SB_LINEUP
Definition: winuser.h:564
#define SB_BOTTOM
Definition: winuser.h:577
#define SW_SCROLLCHILDREN
Definition: winuser.h:2532
#define SM_CXVSCROLL
Definition: winuser.h:951
LONG bottom
Definition: windef.h:299
int WINAPI SetScrollPos(_In_ HWND, _In_ int, _In_ int, _In_ BOOL)
#define LOWORD(l)
Definition: pedump.c:82
#define WM_VSCROLL
Definition: winuser.h:1720
BOOL WINAPI SetDeskWallPaper ( LPCSTR  )
BOOL WINAPI SetLogonNotifyWindow ( HWND  Wnd)

Definition at line 91 of file logon.c.

Referenced by InitializeSAS().

92 {
93  return NtUserSetLogonNotifyWindow(Wnd);
94 }
BOOL NTAPI NtUserSetLogonNotifyWindow(HWND hWnd)
Definition: winsta.c:1890
BOOL WINAPI SetShellWindow ( HWND  )

Definition at line 641 of file desktop.c.

Referenced by DesktopWindow::Init(), IsAnyDesktopRunning(), test_shell_window(), and DesktopWindow::WndProc().

642 {
643  return SetShellWindowEx(hwndShell, hwndShell);
644 }
BOOL WINAPI SetShellWindowEx(HWND, HWND)
Definition: ntwrapper.h:58
BOOL WINAPI SetShellWindowEx ( HWND  ,
HWND   
)

Definition at line 58 of file ntwrapper.h.

Referenced by DesktopWindow::Init(), CDesktopBrowser::Initialize(), IsAnyDesktopRunning(), and SetShellWindow().

59 {
60  return NtUserSetShellWindowEx(hwndShell, hwndShellListView);
61 }
BOOL NTAPI NtUserSetShellWindowEx(HWND hwndShell, HWND hwndShellListView)
Definition: window.c:3499
DWORD_PTR WINAPI SetSysColorsTemp ( const COLORREF ,
const HBRUSH *  ,
DWORD_PTR   
)

Definition at line 151 of file stubs.c.

154 {
155  DWORD i;
156 
157  if (pPens && pBrushes) /* "set" call */
158  {
159  /* allocate our structure to remember old colors */
160  LPVOID pOldCol = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD)+n*sizeof(HPEN)+n*sizeof(HBRUSH));
161  LPVOID p = pOldCol;
162  *(DWORD_PTR *)p = n; p = (char*)p + sizeof(DWORD);
163  memcpy(p, SysColorPens, n*sizeof(HPEN)); p = (char*)p + n*sizeof(HPEN);
164  memcpy(p, SysColorBrushes, n*sizeof(HBRUSH)); p = (char*)p + n*sizeof(HBRUSH);
165 
166  for (i=0; i < n; i++)
167  {
168  SysColorPens[i] = CreatePen( PS_SOLID, 1, pPens[i] );
169  SysColorBrushes[i] = pBrushes[i];
170  }
171 
172  return (DWORD_PTR) pOldCol;
173  }
174  if (!pPens && !pBrushes) /* "restore" call */
175  {
176  LPVOID pOldCol = (LPVOID)n;
177  LPVOID p = pOldCol;
178  DWORD nCount = *(DWORD *)p;
179  p = (char*)p + sizeof(DWORD);
180 
181  for (i=0; i < nCount; i++)
182  {
184  SysColorPens[i] = *(HPEN *)p; p = (char*)p + sizeof(HPEN);
185  }
186  for (i=0; i < nCount; i++)
187  {
188  SysColorBrushes[i] = *(HBRUSH *)p; p = (char*)p + sizeof(HBRUSH);
189  }
190  /* get rid of storage structure */
191  HeapFree(GetProcessHeap(), 0, pOldCol);
192 
193  return TRUE;
194  }
195  return FALSE;
196 }
#define TRUE
Definition: types.h:120
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
static HPEN SysColorPens[COLOR_MENUBAR+1]
Definition: stubs.c:146
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
DWORD DWORD
Definition: winlogon.h:84
static HBRUSH SysColorBrushes[COLOR_MENUBAR+1]
Definition: stubs.c:147
GLuint n
Definition: s_context.h:57
#define PS_SOLID
Definition: wingdi.h:584
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define LPVOID
Definition: nt_native.h:45
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
uint32_t DWORD_PTR
Definition: typedefs.h:63
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:394
UINT_PTR WINAPI SetSystemTimer ( HWND  ,
UINT_PTR  ,
UINT  ,
TIMERPROC   
)

Definition at line 106 of file ntwrapper.h.

107 {
108  return NtUserSetSystemTimer(hWnd, IDEvent, Period, TimerFunc);
109 }
HWND hWnd
Definition: settings.c:17
_In_ LARGE_INTEGER _In_ ULONG Period
Definition: kefuncs.h:1268
UINT_PTR NTAPI NtUserSetSystemTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc)
Definition: timer.c:680
HWND WINAPI SetTaskmanWindow ( HWND  )

Definition at line 1875 of file window.c.

Referenced by RegisterShellHook().

1876 {
1877  return NtUserxSetTaskmanWindow(hWnd);
1878 }
HWND hWnd
Definition: settings.c:17
EXTINLINE HWND NtUserxSetTaskmanWindow(HWND hWnd)
Definition: ntwrapper.h:758
int WINAPI SoftModalMessageBox ( IN LPMSGBOXDATA  lpMsgBoxData)

Definition at line 617 of file messagebox.c.

Referenced by MessageBoxTimeoutIndirectW(), and TestSoftModalMsgBox().

618 {
619  int ret = 0;
620  MSGBOXDATA mbd;
621  LPMSGBOXPARAMSW lpMsgBoxParams = &mbd.mbp;
622  DLGTEMPLATE *tpl;
623  DLGITEMTEMPLATE *iico, *itxt, *ibtn;
624  NONCLIENTMETRICSW nclm;
625  LPVOID buf;
626  BYTE *dest;
627  LPWSTR caption, text;
628  HFONT hFont, hOldFont;
629  HICON hIcon;
630  HWND hDCWnd;
631  HDC hDC;
632  SIZE units;
633  int bufsize, caplen, textlen, i, btnleft, btntop;
634  size_t ButtonLen;
635  RECT btnrect, txtrect, rc;
636  SIZE btnsize;
637  POINT iconPos; SIZE iconSize;
638 
639  /* Capture the MsgBoxData */
640  memcpy(&mbd, lpMsgBoxData, sizeof(mbd));
641 
642  /* Load the caption */
643  caption = NULL;
644  if (lpMsgBoxParams->lpszCaption && IS_INTRESOURCE(lpMsgBoxParams->lpszCaption))
645  {
646  /* User-defined resource string */
647  caplen = LoadAllocStringW(lpMsgBoxParams->hInstance,
648  PtrToUlong(lpMsgBoxParams->lpszCaption),
649  &caption,
650  NULL);
651  lpMsgBoxParams->lpszCaption = caption;
652  }
653  else if (lpMsgBoxParams->lpszCaption)
654  {
655  /* UNICODE string pointer */
656  caplen = wcslen(lpMsgBoxParams->lpszCaption);
657  }
658  if (!lpMsgBoxParams->lpszCaption)
659  {
660  /* No caption, use blank */
661  lpMsgBoxParams->lpszCaption = L"";
662  caplen = 0;
663  }
664 
665  /* Load the text */
666  text = NULL;
667  if (lpMsgBoxParams->lpszText && IS_INTRESOURCE(lpMsgBoxParams->lpszText))
668  {
669  /* User-defined resource string */
670  textlen = LoadAllocStringW(lpMsgBoxParams->hInstance,
671  PtrToUlong(lpMsgBoxParams->lpszText),
672  &text,
673  NULL);
674  lpMsgBoxParams->lpszText = text;
675  }
676  else if (lpMsgBoxParams->lpszText)
677  {
678  /* UNICODE string pointer */
679  textlen = wcslen(lpMsgBoxParams->lpszText);
680  }
681  if (!lpMsgBoxParams->lpszText)
682  {
683  /* No text, use blank */
684  lpMsgBoxParams->lpszText = L"";
685  textlen = 0;
686  }
687 
688  /* Load the icon */
689  switch (lpMsgBoxParams->dwStyle & MB_ICONMASK)
690  {
691  case MB_ICONEXCLAMATION: // case MB_ICONWARNING:
692  hIcon = LoadIconW(NULL, IDI_EXCLAMATIONW);
694  break;
695  case MB_ICONQUESTION:
696  hIcon = LoadIconW(NULL, IDI_QUESTIONW);
698  break;
699  case MB_ICONASTERISK: // case MB_ICONINFORMATION:
700  hIcon = LoadIconW(NULL, IDI_ASTERISKW);
702  break;
703  case MB_ICONHAND: // case MB_ICONSTOP: case MB_ICONERROR:
704  hIcon = LoadIconW(NULL, IDI_HANDW);
706  break;
707  case MB_USERICON:
708  hIcon = LoadIconW(lpMsgBoxParams->hInstance, lpMsgBoxParams->lpszIcon);
710  break;
711  default:
712  /*
713  * By default, Windows 95/98/NT does not associate an icon
714  * to message boxes. So ReactOS should do the same.
715  */
716  hIcon = NULL;
718  break;
719  }
720  /* Reuse the internal pointer! */
721  lpMsgBoxParams->lpszIcon = (LPCWSTR)hIcon;
722 
723  /* Basic space */
724  bufsize = sizeof(DLGTEMPLATE) +
725  2 * sizeof(WORD) + /* menu and class */
726  (caplen + 1) * sizeof(WCHAR) + /* title */
727  sizeof(WORD); /* font height */
728 
729  /* Space for the icon */
730  if (hIcon)
731  {
732  bufsize = ALIGN_UP(bufsize, DWORD);
733  bufsize += sizeof(DLGITEMTEMPLATE) +
734  4 * sizeof(WORD) +
735  sizeof(WCHAR);
736  }
737 
738  /* Space for the text */
739  bufsize = ALIGN_UP(bufsize, DWORD);
740  bufsize += sizeof(DLGITEMTEMPLATE) +
741  3 * sizeof(WORD) +
742  (textlen + 1) * sizeof(WCHAR);
743 
744  /* Space for the buttons */
745  for (i = 0; i < mbd.dwButtons; i++)
746  {
747  if (!mbd.ppszButtonText[i] || !*mbd.ppszButtonText[i])
748  {
749  /* No text, use blank */
750  mbd.ppszButtonText[i] = L"";
751  ButtonLen = 0;
752  }
753  else
754  {
755  /* UNICODE string pointer */
756  ButtonLen = wcslen(mbd.ppszButtonText[i]);
757  }
758 
759  bufsize = ALIGN_UP(bufsize, DWORD);
760  bufsize += sizeof(DLGITEMTEMPLATE) +
761  3 * sizeof(WORD) +
762  (ButtonLen + 1) * sizeof(WCHAR);
763  }
764 
765  /* Allocate the dialog template */
766  buf = RtlAllocateHeap(RtlGetProcessHeap(), 0, bufsize);
767  if (!buf)
768  goto Quit;
769 
770  iico = itxt = NULL;
771 
772 
773  nclm.cbSize = sizeof(nclm);
774  SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(nclm), &nclm, 0);
775  hFont = CreateFontIndirectW(&nclm.lfMessageFont);
776  if (!hFont)
777  {
778  ERR("Cannot retrieve nclm.lfMessageFont! (error %lu)\n", GetLastError());
779  goto Quit;
780  }
781 
782  hDCWnd = NULL;
783  hDC = GetDCEx(hDCWnd, NULL, DCX_WINDOW | DCX_CACHE);
784  if (!hDC)
785  {
786  /* Retry with the DC of the owner window */
787  hDCWnd = lpMsgBoxParams->hwndOwner;
788  hDC = GetDCEx(hDCWnd, NULL, DCX_WINDOW | DCX_CACHE);
789  }
790  if (!hDC)
791  {
792  ERR("GetDCEx() failed, bail out! (error %lu)\n", GetLastError());
793  goto Quit;
794  }
795  hOldFont = SelectObject(hDC, hFont);
796 
797  units.cx = GdiGetCharDimensions(hDC, NULL, &units.cy);
798  if (!units.cx)
799  {
800  DWORD defUnits;
801  ERR("GdiGetCharDimensions() failed, falling back to default values (error %lu)\n", GetLastError());
802  defUnits = GetDialogBaseUnits();
803  units.cx = LOWORD(defUnits);
804  units.cy = HIWORD(defUnits);
805  }
806 
807  /* Calculate the caption rectangle */
808  txtrect.right = MulDiv(GetSystemMetrics(SM_CXSCREEN), 4, 5);
809  if (hIcon)
811  txtrect.top = txtrect.left = txtrect.bottom = 0;
812  if (textlen != 0)
813  {
814  DrawTextW(hDC, lpMsgBoxParams->lpszText, textlen, &txtrect,
816  }
817  else
818  {
819  txtrect.right = txtrect.left + 1;
820  txtrect.bottom = txtrect.top + 1;
821  }
822  txtrect.right++;
823 
824  /* Calculate the maximum buttons size */
825  btnsize.cx = BTN_CX;
826  btnsize.cy = BTN_CY;
827  btnrect.left = btnrect.top = 0;
828  for (i = 0; i < mbd.dwButtons; i++)
829  {
830  // btnrect.right = btnrect.bottom = 0; // FIXME: Is it needed??
831  DrawTextW(hDC, mbd.ppszButtonText[i], wcslen(mbd.ppszButtonText[i]),
832  &btnrect, DT_LEFT | DT_SINGLELINE | DT_CALCRECT);
833  btnsize.cx = max(btnsize.cx, btnrect.right);
834  btnsize.cy = max(btnsize.cy, btnrect.bottom);
835  }
836 
837  if (hOldFont)
838  SelectObject(hDC, hOldFont);
839 
840  ReleaseDC(hDCWnd, hDC);
841 
842  if (hFont)
843  DeleteObject(hFont);
844 
845 
846  /* Calculate position and size of controls */
847 
848 
849  /* Calculate position and size of the icon */
850  rc.left = rc.bottom = rc.right = 0;
851  btntop = 0;
852  if (hIcon)
853  {
856 #ifdef MSGBOX_ICONVCENTER
857  rc.top = MSGBOXEX_MARGIN + ((max(txtrect.bottom, rc.bottom) - rc.bottom) / 2);
858  rc.top = max(MSGBOXEX_SPACING, rc.top);
859 #else
860  rc.top = MSGBOXEX_MARGIN;
861 #endif
862  btnleft = (mbd.dwButtons * (btnsize.cx + MSGBOXEX_BUTTONSPACING)) - MSGBOXEX_BUTTONSPACING;
863  if (btnleft > txtrect.right + rc.right + MSGBOXEX_SPACING)
864  {
865 #ifdef MSGBOX_TEXTHCENTER
866  rc.left = MSGBOXEX_MARGIN + ((btnleft - txtrect.right - rc.right - MSGBOXEX_SPACING) / 2);
867 #else
868  rc.left = MSGBOXEX_MARGIN;
869 #endif
870  btnleft = MSGBOXEX_MARGIN;
871  }
872  else
873  {
874  rc.left = MSGBOXEX_MARGIN;
875  btnleft = MSGBOXEX_MARGIN + ((txtrect.right + rc.right + MSGBOXEX_SPACING - btnleft) / 2);
876  }
877 
878  iconPos.x = RESCALE_X(rc.left, units);
879  iconPos.y = RESCALE_Y(rc.top, units);
880  iconSize.cx = RESCALE_X(rc.right, units);
881  iconSize.cy = RESCALE_Y(rc.bottom, units);
882 
883  btntop = rc.top + rc.bottom + MSGBOXEX_SPACING;
884  rc.left += rc.right + MSGBOXEX_SPACING;
885  }
886  else
887  {
888  btnleft = (mbd.dwButtons * (btnsize.cx + MSGBOXEX_BUTTONSPACING)) - MSGBOXEX_BUTTONSPACING;
889  if (btnleft > txtrect.right)
890  {
891 #ifdef MSGBOX_TEXTHCENTER
892  rc.left = MSGBOXEX_MARGIN + ((btnleft - txtrect.right) / 2);
893 #else
894  rc.left = MSGBOXEX_MARGIN;
895 #endif
896  btnleft = MSGBOXEX_MARGIN;
897  }
898  else
899  {
900  rc.left = MSGBOXEX_MARGIN;
901  btnleft = MSGBOXEX_MARGIN + ((txtrect.right - btnleft) / 2);
902  }
903  }
904 
905 
906  /* Initialize the dialog template */
907  tpl = (DLGTEMPLATE *)buf;
908 
912  if (lpMsgBoxParams->dwStyle & MB_TOPMOST)
914  if (lpMsgBoxParams->dwStyle & MB_RIGHT)
916  tpl->x = 100;
917  tpl->y = 100;
918  tpl->cdit = mbd.dwButtons + (hIcon ? 1 : 0) + 1; /* Buttons, icon and text */
919 
920  dest = (BYTE *)(tpl + 1);
921 
922  *(DWORD*)dest = 0; /* no menu and use default window class */
923  dest += 2 * sizeof(WORD);
924  memcpy(dest, lpMsgBoxParams->lpszCaption, caplen * sizeof(WCHAR));
925  dest += caplen * sizeof(WCHAR);
926  *(WCHAR*)dest = L'\0';
927  dest += sizeof(WCHAR);
928 
929  /*
930  * A font point size (height) of 0x7FFF means that we use
931  * the message box font (NONCLIENTMETRICSW.lfMessageFont).
932  */
933  *(WORD*)dest = 0x7FFF;
934  dest += sizeof(WORD);
935 
936  /* Create the icon */
937  if (hIcon)
938  {
939  dest = ALIGN_UP_POINTER(dest, DWORD);
940  iico = (DLGITEMTEMPLATE *)dest;
941  iico->style = WS_CHILD | WS_VISIBLE | SS_ICON;
942  iico->dwExtendedStyle = 0;
943  iico->id = MSGBOX_IDICON;
944 
945  iico->x = iconPos.x;
946  iico->y = iconPos.y;
947  iico->cx = iconSize.cx;
948  iico->cy = iconSize.cy;
949 
950  dest += sizeof(DLGITEMTEMPLATE);
951  *(WORD*)dest = 0xFFFF;
952  dest += sizeof(WORD);
953  *(WORD*)dest = 0x0082; /* static control */
954  dest += sizeof(WORD);
955  *(WORD*)dest = 0xFFFF;
956  dest += sizeof(WORD);
957  *(WCHAR*)dest = 0;
958  dest += sizeof(WCHAR);
959  *(WORD*)dest = 0;
960  dest += sizeof(WORD);
961  }
962 
963  /* Create static for text */
964  dest = ALIGN_UP_POINTER(dest, DWORD);
965  itxt = (DLGITEMTEMPLATE *)dest;
966  itxt->style = WS_CHILD | WS_VISIBLE | SS_NOPREFIX;
967  if (lpMsgBoxParams->dwStyle & MB_RIGHT)
968  itxt->style |= SS_RIGHT;
969  else
970  itxt->style |= SS_LEFT;
971  itxt->dwExtendedStyle = 0;
972  itxt->id = MSGBOX_IDTEXT;
973  dest += sizeof(DLGITEMTEMPLATE);
974  *(WORD*)dest = 0xFFFF;
975  dest += sizeof(WORD);
976  *(WORD*)dest = 0x0082; /* static control */
977  dest += sizeof(WORD);
978  memcpy(dest, lpMsgBoxParams->lpszText, textlen * sizeof(WCHAR));
979  dest += textlen * sizeof(WCHAR);
980  *(WCHAR*)dest = 0;
981  dest += sizeof(WCHAR);
982  *(WORD*)dest = 0;
983  dest += sizeof(WORD);
984 
985 
986  /* Calculate position of the text */
987  rc.top = MSGBOXEX_MARGIN + ((rc.bottom - txtrect.bottom) / 2);
988  rc.top = max(rc.top, MSGBOXEX_MARGIN);
989 
990 
991  /* Make the first button the default button if none other is */
992  if (mbd.uDefButton >= mbd.dwButtons)
993  mbd.uDefButton = 0;
994 
995  /* Create and calculate the position of the buttons */
996  btntop = max(rc.top + txtrect.bottom + MSGBOXEX_SPACING, btntop);
997  for (i = 0; i < mbd.dwButtons; i++)
998  {
999  ButtonLen = wcslen(mbd.ppszButtonText[i]);
1000 
1001  dest = ALIGN_UP_POINTER(dest, DWORD);
1002  ibtn = (DLGITEMTEMPLATE *)dest;
1003 
1004  ibtn->style = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
1005  if (i == mbd.uDefButton)
1006  ibtn->style |= BS_DEFPUSHBUTTON;
1007  else
1008  ibtn->style |= BS_PUSHBUTTON;
1009 
1010  ibtn->dwExtendedStyle = 0;
1011  ibtn->id = mbd.pidButton[i];
1012  dest += sizeof(DLGITEMTEMPLATE);
1013  *(WORD*)dest = 0xFFFF;
1014  dest += sizeof(WORD);
1015  *(WORD*)dest = 0x0080; /* button control */
1016  dest += sizeof(WORD);
1017  memcpy(dest, mbd.ppszButtonText[i], ButtonLen * sizeof(WCHAR));
1018  dest += ButtonLen * sizeof(WCHAR);
1019  *(WORD*)dest = 0;
1020  dest += sizeof(WORD);
1021  *(WORD*)dest = 0;
1022  dest += sizeof(WORD);
1023 
1024  ibtn->x = RESCALE_X(btnleft, units);
1025  ibtn->y = RESCALE_Y(btntop, units);
1026  ibtn->cx = RESCALE_X(btnsize.cx, units);
1027  ibtn->cy = RESCALE_Y(btnsize.cy, units);
1028  btnleft += btnsize.cx + MSGBOXEX_BUTTONSPACING;
1029  }
1030 
1031  /* Calculate the size and position of the message-box window */
1032  btnleft = max(btnleft - MSGBOXEX_BUTTONSPACING, rc.left + txtrect.right);
1033  btnleft += MSGBOXEX_MARGIN;
1034  if (mbd.dwButtons > 0)
1035  btntop += btnsize.cy + MSGBOXEX_MARGIN;
1036 
1037  /* Set the size and position of the static message */
1038  itxt->x = RESCALE_X(rc.left, units);
1039  itxt->y = RESCALE_Y(rc.top, units);
1040  itxt->cx = RESCALE_X(btnleft - rc.left - MSGBOXEX_MARGIN, units);
1041  itxt->cy = RESCALE_Y(txtrect.bottom, units);
1042 
1043  /* Set the size of the window */
1044  tpl->cx = RESCALE_X(btnleft, units);
1045  tpl->cy = RESCALE_Y(btntop, units);
1046 
1047  /* Finally show the message-box */
1048  ERR("MessageBox: %s\n", wine_dbgstr_wn(lpMsgBoxParams->lpszText, textlen));
1049  ret = DialogBoxIndirectParamW(lpMsgBoxParams->hInstance, tpl,
1050  lpMsgBoxParams->hwndOwner,
1051  MessageBoxProc, (LPARAM)&mbd);
1052 
1053 Quit:
1054  if (buf)
1055  RtlFreeHeap(RtlGetProcessHeap(), 0, buf);
1056 
1057  if (text)
1058  RtlFreeHeap(RtlGetProcessHeap(), 0, text);
1059 
1060  if (caption)
1061  RtlFreeHeap(RtlGetProcessHeap(), 0, caption);
1062 
1063  return ret;
1064 }
#define MB_ICONMASK
Definition: winuser.h:813
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define MB_ICONHAND
Definition: winuser.h:782
#define HDC
Definition: msvc.h:22
#define DT_EXPANDTABS
Definition: winuser.h:532
#define IDI_HANDW
Definition: messagebox.c:44
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
#define max(a, b)
Definition: svc.c:63
static HICON
Definition: imagelist.c:84
unsigned short WORD
Definition: ntddk_ex.h:93
LPCWSTR * ppszButtonText
Definition: messagebox.c:32
long y
Definition: polytest.cpp:48
#define ALIGN_UP(size, type)
Definition: umtypes.h:91
long x
Definition: polytest.cpp:48
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MSGBOXEX_BUTTONSPACING
Definition: messagebox.c:57
static INT_PTR CALLBACK MessageBoxProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: messagebox.c:248
const WCHAR * text
Definition: package.c:1827
#define DT_WORDBREAK
Definition: winuser.h:544
#define BTN_CY
Definition: messagebox.c:54
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:603
#define BS_DEFPUSHBUTTON
Definition: pedump.c:652
#define DS_CENTER
Definition: winuser.h:369
LONG top
Definition: windef.h:297
INT * pidButton
Definition: messagebox.c:31
HANDLE HWND
Definition: compat.h:13
DWORD style
Definition: winuser.h:3012
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
LPCWSTR lpszText
Definition: winuser.h:3281
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:296
GLenum GLuint GLsizei bufsize
Definition: glext.h:7473
#define MB_TOPMOST
Definition: winuser.h:819
#define WCHAR
Definition: msvc.h:43
LONG right
Definition: windef.h:298
#define DT_NOPREFIX
Definition: winuser.h:537
#define WS_EX_RIGHT
Definition: winuser.h:400
#define IDI_EXCLAMATIONW
Definition: messagebox.c:46
DWORD DWORD
Definition: winlogon.h:84
#define SS_RIGHT
Definition: pedump.c:694
HFONT hFont
Definition: main.c:53
#define DCX_WINDOW
Definition: winuser.h:2074
#define MB_ICONEXCLAMATION
Definition: winuser.h:779
#define DS_MODALFRAME
Definition: winuser.h:375
#define SM_CXSCREEN
Definition: winuser.h:949
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define WS_EX_CONTROLPARENT
Definition: winuser.h:387
#define DT_LEFT
Definition: winuser.h:534
#define DT_CALCRECT
Definition: winuser.h:526
LONG_PTR LPARAM
Definition: windef.h:208
#define MB_USERICON
Definition: winuser.h:777
LPCWSTR lpszIcon
Definition: winuser.h:3284
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define SS_LEFT
Definition: pedump.c:692
#define SM_CXICON
Definition: winuser.h:962
smooth NULL
Definition: ftsmooth.c:416
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define WS_EX_DLGMODALFRAME
Definition: pedump.c:645
LPCWSTR lpszCaption
Definition: winuser.h:3282
#define MB_ICONQUESTION
Definition: winuser.h:783
LONG cx
Definition: windef.h:324
POINT iconPos
Definition: startmenu.cpp:1391
#define PtrToUlong(p)
Definition: basetsd.h:83
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:585
DWORD dwExtendedStyle
Definition: winuser.h:3013
#define WS_CAPTION
Definition: pedump.c:624
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define MSGBOXEX_SPACING
Definition: messagebox.c:56
HDC hDC
Definition: wglext.h:521
static UINT LoadAllocStringW(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, OUT PWSTR *pString, IN PCWSTR pDefaultString OPTIONAL)
Definition: messagebox.c:108
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define DS_NOIDLEMSG
Definition: winuser.h:377
HWND hwndOwner
Definition: winuser.h:3279
GLfloat CONST GLvector4f CONST GLfloat GLvector4f * dest
Definition: m_xform.h:122
#define MSGBOX_IDTEXT
Definition: messagebox.c:42
int WINAPI GetSystemMetrics(_In_ int)
DWORD dwButtons
Definition: messagebox.c:33
#define MB_ICONASTERISK
Definition: winuser.h:778
int ret
#define SM_CYICON
Definition: winuser.h:963
static const WCHAR L[]
Definition: oid.c:1087
#define DS_SETFONT
Definition: winuser.h:378
short x
Definition: winuser.h:3015
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define WS_EX_TOPMOST
Definition: pedump.c:647
HINSTANCE hInstance
Definition: winuser.h:3280
#define SS_NOPREFIX
Definition: winuser.h:350
const char * wine_dbgstr_wn(const WCHAR *str, int n)
Definition: compat.c:342
#define RESCALE_X(_x, _units)
Definition: messagebox.c:63
#define WS_TABSTOP
Definition: pedump.c:634
short y
Definition: winuser.h:3016
BOOL WINAPI MessageBeep(IN UINT uType)
Definition: messagebox.c:1329
#define BS_PUSHBUTTON
Definition: pedump.c:651
unsigned char BYTE
Definition: ntddk_ex.h:96
WORD cdit
Definition: winuser.h:3014
#define ERR(fmt,...)
Definition: debug.h:109
#define DCX_CACHE
Definition: winuser.h:2075
#define DT_SINGLELINE
Definition: winuser.h:540
GLfloat units
Definition: glext.h:11727
LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *)
Definition: font.c:1922
#define BTN_CX
Definition: messagebox.c:53
#define MB_RIGHT
Definition: winuser.h:789
HICON hIcon
Definition: msconfig.c:44
#define DT_EXTERNALLEADING
Definition: winuser.h:533
#define ALIGN_UP_POINTER(ptr, type)
Definition: umtypes.h:97
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define WS_POPUP
Definition: pedump.c:616
UINT uDefButton
Definition: messagebox.c:34
#define MB_OK
Definition: winuser.h:784
short cy
Definition: winuser.h:3018
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
MSGBOXPARAMSW mbp
Definition: messagebox.c:25
#define RESCALE_Y(_y, _units)
Definition: messagebox.c:64
#define HIWORD(l)
Definition: typedefs.h:246
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
LONG bottom
Definition: windef.h:299
DWORD dwExtendedStyle
Definition: winuser.h:3003
short cx
Definition: winuser.h:3017
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_SYSMENU
Definition: pedump.c:629
WCHAR * LPWSTR
Definition: xmlstorage.h:184
DWORD dwStyle
Definition: winuser.h:3283
#define SS_ICON
Definition: pedump.c:695
LONG cy
Definition: windef.h:325
#define LOWORD(l)
Definition: pedump.c:82
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define MSGBOXEX_MARGIN
Definition: messagebox.c:58
#define IDI_ASTERISKW
Definition: messagebox.c:47
#define MulDiv(x, y, z)
Definition: gdifloat.h:86
#define DT_EDITCONTROL
Definition: winuser.h:528
#define IDI_QUESTIONW
Definition: messagebox.c:45
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17
#define LPCWSTR
Definition: msvc.h:45
LONG WINAPI GetDialogBaseUnits(void)
Definition: dialog.c:2076
#define MSGBOX_IDICON
Definition: messagebox.c:41
BOOL WINAPI UnregisterUserApiHook ( VOID  )

Definition at line 394 of file usrapihk.c.

Referenced by ThemeHooksRemove().

395 {
397 }
BOOL NTAPI NtUserUnregisterUserApiHook(VOID)
Definition: hook.c:1754
BOOL WINAPI UpdatePerUserSystemParameters ( DWORD  dwReserved,
BOOL  bEnable 
)

Definition at line 101 of file logon.c.

103 {
104  // Update Imm support and load Imm32.dll.
106 
108 }
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
BOOL NTAPI NtUserUpdatePerUserSystemParameters(DWORD dwReserved, BOOL bEnable)
Definition: sysparams.c:345
_In_ BOOL bEnable
Definition: winddi.h:3426
BOOL WINAPI UpdatePerUserImmEnabling(VOID)
Definition: imm.c:287