ReactOS 0.4.16-dev-319-g6cf4263
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_FINALDESTROY   0x00000070
 
#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_IME_SYSTEM   0x00000287
 
#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 KL_UNLOAD   0x20000000
 
#define UKL_NOACTIVATENEXT   0x80000000
 
#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_DATAPBALLOON_HARD_ERROR_DATA
 
typedef struct _MSGBOXDATA MSGBOXDATA
 
typedef struct _MSGBOXDATAPMSGBOXDATA
 
typedef struct _MSGBOXDATALPMSGBOXDATA
 
typedef enum _UPDATE_INPUT_CONTEXT UPDATE_INPUT_CONTEXT
 
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
 
typedef enum _QUERY_INPUT_CONTEXT QUERY_INPUT_CONTEXT
 
typedef enum tagSETIMEHOTKEY_ACTION SETIMEHOTKEY_ACTION
 

Enumerations

enum  _UPDATE_INPUT_CONTEXT { UIC_CLIENTIMCDATA = 0 , UIC_IMEWINDOW }
 
enum  _UAPIHK { uahLoadInit , uahStop , uahShutdown }
 
enum  _QUERY_INPUT_CONTEXT { QIC_INPUTPROCESSID = 0 , QIC_INPUTTHREADID , QIC_DEFAULTWINDOWIME , QIC_DEFAULTIMC }
 
enum  tagSETIMEHOTKEY_ACTION { SETIMEHOTKEY_DELETE = 1 , SETIMEHOTKEY_ADD , SETIMEHOTKEY_INITIALIZE }
 

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

◆ CW_USEDEFAULT16

#define CW_USEDEFAULT16   ((short)0x8000)

Definition at line 169 of file undocuser.h.

◆ DC_DRAWCAPTIONMD

#define DC_DRAWCAPTIONMD   0x10000000

Definition at line 151 of file undocuser.h.

◆ DC_DRAWFRAMEMD

#define DC_DRAWFRAMEMD   0x80000000

Definition at line 153 of file undocuser.h.

◆ DC_FRAME

#define DC_FRAME   0x8000

Definition at line 149 of file undocuser.h.

◆ DC_NOSENDMSG

#define DC_NOSENDMSG   0x2000

Definition at line 148 of file undocuser.h.

◆ DC_NOVISIBLE

#define DC_NOVISIBLE   0x0800

Definition at line 147 of file undocuser.h.

◆ DC_REDRAWHUNGWND

#define DC_REDRAWHUNGWND   0x20000000

Definition at line 152 of file undocuser.h.

◆ DCX_KEEPCLIPRGN

#define DCX_KEEPCLIPRGN   0x00040000

Definition at line 68 of file undocuser.h.

◆ DCX_KEEPLAYOUT

#define DCX_KEEPLAYOUT   0x40000000

Definition at line 69 of file undocuser.h.

◆ DCX_PROCESSOWNED

#define DCX_PROCESSOWNED   0x80000000

Definition at line 70 of file undocuser.h.

◆ DCX_USESTYLE

#define DCX_USESTYLE   0x00010000

Definition at line 67 of file undocuser.h.

◆ DFCS_MENUARROWDOWN

#define DFCS_MENUARROWDOWN   0x0010

Definition at line 159 of file undocuser.h.

◆ DFCS_MENUARROWUP

#define DFCS_MENUARROWUP   0x0008

Definition at line 158 of file undocuser.h.

◆ DrawCaptionTemp

#define DrawCaptionTemp   DrawCaptionTempA

Definition at line 215 of file undocuser.h.

◆ ES_COMBO

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

Definition at line 16 of file undocuser.h.

◆ EWX_CALLER_SYSTEM

#define EWX_CALLER_SYSTEM   0x0100

Definition at line 128 of file undocuser.h.

◆ EWX_CALLER_WINLOGON

#define EWX_CALLER_WINLOGON   0x0200

Definition at line 129 of file undocuser.h.

◆ EWX_CALLER_WINLOGON_LOGOFF

#define EWX_CALLER_WINLOGON_LOGOFF   0x1000

Definition at line 130 of file undocuser.h.

◆ EWX_NONOTIFY

#define EWX_NONOTIFY   0x10000

Definition at line 135 of file undocuser.h.

◆ EWX_NOTIFY

#define EWX_NOTIFY   0x8000

Definition at line 134 of file undocuser.h.

◆ EWX_SHUTDOWN_CANCELED

#define EWX_SHUTDOWN_CANCELED   0x0080

Definition at line 127 of file undocuser.h.

◆ ID_TME_TIMER

#define ID_TME_TIMER   (0xFFFA)

Definition at line 81 of file undocuser.h.

◆ IDCARETTIMER

#define IDCARETTIMER   (0xffff)

Definition at line 80 of file undocuser.h.

◆ IPHK_CHECKCTRL

#define IPHK_CHECKCTRL   0x0004

Definition at line 141 of file undocuser.h.

◆ IPHK_HOTKEY

#define IPHK_HOTKEY   0x0001

Definition at line 139 of file undocuser.h.

◆ IPHK_PROCESSBYIME

#define IPHK_PROCESSBYIME   0x0002

Definition at line 140 of file undocuser.h.

◆ IPHK_SKIPTHISKEY

#define IPHK_SKIPTHISKEY   0x0010

Definition at line 142 of file undocuser.h.

◆ KL_UNLOAD

#define KL_UNLOAD   0x20000000

Definition at line 179 of file undocuser.h.

◆ LB_CARETOFF

#define LB_CARETOFF   0x000001a4

Definition at line 52 of file undocuser.h.

◆ LB_CARETON

#define LB_CARETON   0x000001a3

Definition at line 51 of file undocuser.h.

◆ LN_LOCK_WORKSTATION

#define LN_LOCK_WORKSTATION   0x5

Definition at line 118 of file undocuser.h.

◆ LN_LOGOFF

#define LN_LOGOFF   0x0

Definition at line 115 of file undocuser.h.

◆ LN_LOGOFF_CANCELED

#define LN_LOGOFF_CANCELED   0xB

Definition at line 122 of file undocuser.h.

◆ LN_MESSAGE_BEEP

#define LN_MESSAGE_BEEP   0x9

Definition at line 120 of file undocuser.h.

◆ LN_SHELL_EXITED

#define LN_SHELL_EXITED   0x2

Definition at line 116 of file undocuser.h.

◆ LN_START_SCREENSAVE

#define LN_START_SCREENSAVE   0xA

Definition at line 121 of file undocuser.h.

◆ LN_START_TASK_MANAGER

#define LN_START_TASK_MANAGER   0x4

Definition at line 117 of file undocuser.h.

◆ LN_UNLOCK_WORKSTATION

#define LN_UNLOCK_WORKSTATION   0x6

Definition at line 119 of file undocuser.h.

◆ MCS_ENDSESSION

#define MCS_ENDSESSION   1

Definition at line 105 of file undocuser.h.

◆ MCS_QUERYENDSESSION

#define MCS_QUERYENDSESSION   2

Definition at line 106 of file undocuser.h.

◆ MCSR_DONOTSHUTDOWN

#define MCSR_DONOTSHUTDOWN   3

Definition at line 110 of file undocuser.h.

◆ MCSR_GOODFORSHUTDOWN

#define MCSR_GOODFORSHUTDOWN   1

Definition at line 108 of file undocuser.h.

◆ MCSR_SHUTDOWNFINISHED

#define MCSR_SHUTDOWNFINISHED   2

Definition at line 109 of file undocuser.h.

◆ MessageBoxTimeout

#define MessageBoxTimeout   MessageBoxTimeoutA

Definition at line 301 of file undocuser.h.

◆ MN_SETHMENU

#define MN_SETHMENU   0x000001e0

Definition at line 53 of file undocuser.h.

◆ MOD_WINLOGON_SAS

#define MOD_WINLOGON_SAS   0x8000

Definition at line 167 of file undocuser.h.

◆ NUCWE_ANSI

#define NUCWE_ANSI   0x00000001

Definition at line 76 of file undocuser.h.

◆ NUCWE_SIDEBYSIDE

#define NUCWE_SIDEBYSIDE   0x40000000

Definition at line 77 of file undocuser.h.

◆ QS_EVENT

#define QS_EVENT   0x2000

Definition at line 97 of file undocuser.h.

◆ QS_SMRESULT

#define QS_SMRESULT   0x8000 /* see "Undoc. Windows" */

Definition at line 95 of file undocuser.h.

◆ QS_SYSEVENT

#define QS_SYSEVENT   (QS_EVENT|QS_SENDMESSAGE)

Definition at line 98 of file undocuser.h.

◆ SBRG_BOTTOMLEFTBTN

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

Definition at line 176 of file undocuser.h.

◆ SBRG_PAGEDOWNLEFT

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

Definition at line 175 of file undocuser.h.

◆ SBRG_PAGEUPRIGHT

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

Definition at line 173 of file undocuser.h.

◆ SBRG_SCROLLBAR

#define SBRG_SCROLLBAR   0 /* the scrollbar itself */

Definition at line 171 of file undocuser.h.

◆ SBRG_SCROLLBOX

#define SBRG_SCROLLBOX   3 /* the scroll box */

Definition at line 174 of file undocuser.h.

◆ SBRG_TOPRIGHTBTN

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

Definition at line 172 of file undocuser.h.

◆ SIF_PREVIOUSPOS

#define SIF_PREVIOUSPOS   4096

Definition at line 89 of file undocuser.h.

◆ STARTF_INHERITDESKTOP

#define STARTF_INHERITDESKTOP   0x40000000

Definition at line 164 of file undocuser.h.

◆ STARTF_SCREENSAVER

#define STARTF_SCREENSAVER   0x80000000

Definition at line 165 of file undocuser.h.

◆ SW_SCROLLWNDDCE

#define SW_SCROLLWNDDCE   0x8000

Definition at line 92 of file undocuser.h.

◆ SWP_NOCLIENTMOVE

#define SWP_NOCLIENTMOVE   0x1000

Definition at line 85 of file undocuser.h.

◆ SWP_NOCLIENTSIZE

#define SWP_NOCLIENTSIZE   0x0800

Definition at line 84 of file undocuser.h.

◆ SWP_STATECHANGED

#define SWP_STATECHANGED   0x8000

Definition at line 86 of file undocuser.h.

◆ TPM_SYSTEM_MENU

#define TPM_SYSTEM_MENU   0x00000200

Definition at line 73 of file undocuser.h.

◆ UAH_HOOK_MESSAGE

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

Definition at line 338 of file undocuser.h.

◆ UAH_IS_MESSAGE_HOOKED

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

Definition at line 339 of file undocuser.h.

◆ UAHOWP_MAX_SIZE

#define UAHOWP_MAX_SIZE   WM_USER/8

Definition at line 340 of file undocuser.h.

◆ UKL_NOACTIVATENEXT

#define UKL_NOACTIVATENEXT   0x80000000

Definition at line 182 of file undocuser.h.

◆ WC_DESKTOP

#define WC_DESKTOP   (MAKEINTATOM(0x8001))

Definition at line 10 of file undocuser.h.

◆ WC_DIALOG

#define WC_DIALOG   (MAKEINTATOM(0x8002))

Definition at line 11 of file undocuser.h.

◆ WC_ICONTITLE

#define WC_ICONTITLE   (MAKEINTATOM(0x8004))

Definition at line 13 of file undocuser.h.

◆ WC_MENU

#define WC_MENU   (MAKEINTATOM(0x8000))

Definition at line 9 of file undocuser.h.

◆ WC_SWITCH

#define WC_SWITCH   (MAKEINTATOM(0x8003))

Definition at line 12 of file undocuser.h.

◆ WM_ALTTABACTIVE

#define WM_ALTTABACTIVE   0x00000029

Definition at line 32 of file undocuser.h.

◆ WM_BEGINDRAG

#define WM_BEGINDRAG   0x0000022C

Definition at line 56 of file undocuser.h.

◆ WM_CBLOSTTEXTFOCUS

#define WM_CBLOSTTEXTFOCUS   0x00000167

Definition at line 50 of file undocuser.h.

◆ WM_CBT

#define WM_CBT   0x000003FF

Definition at line 63 of file undocuser.h.

◆ WM_CLIENTSHUTDOWN

#define WM_CLIENTSHUTDOWN   0x0000003B

Definition at line 35 of file undocuser.h.

◆ WM_COPYGLOBALDATA

#define WM_COPYGLOBALDATA   0x00000049

Definition at line 36 of file undocuser.h.

◆ WM_DRAGLOOP

#define WM_DRAGLOOP   0x0000022D

Definition at line 57 of file undocuser.h.

◆ WM_DRAGMOVE

#define WM_DRAGMOVE   0x0000022F

Definition at line 59 of file undocuser.h.

◆ WM_DRAGSELECT

#define WM_DRAGSELECT   0x0000022E

Definition at line 58 of file undocuser.h.

◆ WM_DROPOBJECT

#define WM_DROPOBJECT   0x0000022A

Definition at line 54 of file undocuser.h.

◆ WM_FINALDESTROY

#define WM_FINALDESTROY   0x00000070

Definition at line 39 of file undocuser.h.

◆ WM_IME_SYSTEM

#define WM_IME_SYSTEM   0x00000287

Definition at line 60 of file undocuser.h.

◆ WM_ISACTIVEICON

#define WM_ISACTIVEICON   0x00000035

Definition at line 33 of file undocuser.h.

◆ WM_KEYF1

#define WM_KEYF1   0x0000004D

Definition at line 38 of file undocuser.h.

◆ WM_KLUDGEMINRECT

#define WM_KLUDGEMINRECT   0x0000008B

Definition at line 40 of file undocuser.h.

◆ WM_LBTRACKPOINT

#define WM_LBTRACKPOINT   0x00000131

Definition at line 49 of file undocuser.h.

◆ WM_LOGONNOTIFY

#define WM_LOGONNOTIFY   0x0000004C

Definition at line 37 of file undocuser.h.

◆ WM_MAXIMUM

#define WM_MAXIMUM   0x0001FFFF

Definition at line 64 of file undocuser.h.

◆ WM_NCUAHDRAWCAPTION

#define WM_NCUAHDRAWCAPTION   0x000000AE

Definition at line 46 of file undocuser.h.

◆ WM_NCUAHDRAWFRAME

#define WM_NCUAHDRAWFRAME   0x000000AF

Definition at line 47 of file undocuser.h.

◆ WM_POPUPSYSTEMMENU

#define WM_POPUPSYSTEMMENU   0x00000313

Definition at line 61 of file undocuser.h.

◆ WM_QUERYDROPOBJECT

#define WM_QUERYDROPOBJECT   0x0000022B

Definition at line 55 of file undocuser.h.

◆ WM_QUERYPARKICON

#define WM_QUERYPARKICON   0x00000036

Definition at line 34 of file undocuser.h.

◆ WM_SETVISIBLE

#define WM_SETVISIBLE   0x00000009

Definition at line 31 of file undocuser.h.

◆ WM_SYSTIMER

#define WM_SYSTIMER   0x00000118

Definition at line 48 of file undocuser.h.

◆ WM_UAHDRAWITEM

#define WM_UAHDRAWITEM   0x00000092

Definition at line 42 of file undocuser.h.

◆ WM_UAHDRAWMENU

#define WM_UAHDRAWMENU   0x00000091

Definition at line 41 of file undocuser.h.

◆ WM_UAHDRAWMENUNC

#define WM_UAHDRAWMENUNC   0x00000095

Definition at line 45 of file undocuser.h.

◆ WM_UAHINIT

#define WM_UAHINIT   0x0000031b

Definition at line 62 of file undocuser.h.

◆ WM_UAHINITMENU

#define WM_UAHINITMENU   0x00000093

Definition at line 43 of file undocuser.h.

◆ WM_UAHMEASUREITEM

#define WM_UAHMEASUREITEM   0x00000094

Definition at line 44 of file undocuser.h.

◆ WS_EX_DRAGDETECT

#define WS_EX_DRAGDETECT   0x00000002

Definition at line 21 of file undocuser.h.

◆ WS_EX_FORCELEGACYRESIZENCMETR

#define WS_EX_FORCELEGACYRESIZENCMETR   0x00800000

Definition at line 23 of file undocuser.h.

◆ WS_EX_MAKEVISIBLEWHENUNGHOSTED

#define WS_EX_MAKEVISIBLEWHENUNGHOSTED   0x00000800

Definition at line 22 of file undocuser.h.

◆ WS_EX_REDIRECTED

#define WS_EX_REDIRECTED   0x20000000

Definition at line 25 of file undocuser.h.

◆ WS_EX_SETANSICREATOR

#define WS_EX_SETANSICREATOR   0x80000000

Definition at line 28 of file undocuser.h.

◆ WS_EX_UISTATEACTIVE

#define WS_EX_UISTATEACTIVE   0x04000000

Definition at line 24 of file undocuser.h.

◆ WS_EX_UISTATEFOCUSRECTHIDDEN

#define WS_EX_UISTATEFOCUSRECTHIDDEN   0x80000000

Definition at line 27 of file undocuser.h.

◆ WS_EX_UISTATEKBACCELHIDDEN

#define WS_EX_UISTATEKBACCELHIDDEN   0x40000000

Definition at line 26 of file undocuser.h.

◆ WS_MAXIMIZED

#define WS_MAXIMIZED   WS_MAXIMIZE

Definition at line 17 of file undocuser.h.

◆ WS_MINIMIZED

#define WS_MINIMIZED   WS_MINIMIZE

Definition at line 18 of file undocuser.h.

Typedef Documentation

◆ ADJUSTWINDOWRECTEX

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

Definition at line 322 of file undocuser.h.

◆ BALLOON_HARD_ERROR_DATA

◆ DRAWCAPTION

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

Definition at line 328 of file undocuser.h.

◆ DRAWFRAMECONTROL

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

Definition at line 327 of file undocuser.h.

◆ ENABLESCROLLBAR

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

Definition at line 321 of file undocuser.h.

◆ FORCERESETUSERAPIHOOK

typedef BOOL(WINAPI * FORCERESETUSERAPIHOOK) (HINSTANCE)

Definition at line 326 of file undocuser.h.

◆ GETREALWINDOWOWNER

typedef DWORD(WINAPI * GETREALWINDOWOWNER) (HWND)

Definition at line 330 of file undocuser.h.

◆ GETSCROLLINFO

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

Definition at line 319 of file undocuser.h.

◆ GETSYSTEMMETRICS

typedef int(WINAPI * GETSYSTEMMETRICS) (int)

Definition at line 323 of file undocuser.h.

◆ LPMSGBOXDATA

◆ MDIREDRAWFRAME

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

Definition at line 329 of file undocuser.h.

◆ MSGBOXDATA

◆ PBALLOON_HARD_ERROR_DATA

◆ PMSGBOXDATA

◆ PUAHOWP

typedef struct _UAHOWP * PUAHOWP

◆ PUAPIHK

typedef enum _UAPIHK * PUAPIHK

◆ PUSERAPIHOOK

◆ PUSERAPIHOOKINFO

◆ QUERY_INPUT_CONTEXT

◆ SETIMEHOTKEY_ACTION

◆ SETSCROLLINFO

typedef INT(WINAPI * SETSCROLLINFO) (HWND, int, LPCSCROLLINFO, BOOL)

Definition at line 320 of file undocuser.h.

◆ SETWINDOWRGN

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

Definition at line 318 of file undocuser.h.

◆ SYSTEMPARAMETERSINFOA

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

Definition at line 324 of file undocuser.h.

◆ SYSTEMPARAMETERSINFOW

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

Definition at line 325 of file undocuser.h.

◆ UAHOWP

◆ UAPIHK

typedef enum _UAPIHK UAPIHK

◆ UPDATE_INPUT_CONTEXT

◆ USERAPIHOOK

◆ USERAPIHOOKINFO

◆ USERAPIHOOKPROC

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

Definition at line 376 of file undocuser.h.

◆ WNDPROC_OWP

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

Definition at line 317 of file undocuser.h.

Enumeration Type Documentation

◆ _QUERY_INPUT_CONTEXT

Enumerator
QIC_INPUTPROCESSID 
QIC_INPUTTHREADID 
QIC_DEFAULTWINDOWIME 
QIC_DEFAULTIMC 

Definition at line 396 of file undocuser.h.

397{
@ QIC_DEFAULTWINDOWIME
Definition: undocuser.h:400
@ QIC_DEFAULTIMC
Definition: undocuser.h:401
@ QIC_INPUTTHREADID
Definition: undocuser.h:399
@ QIC_INPUTPROCESSID
Definition: undocuser.h:398
enum _QUERY_INPUT_CONTEXT QUERY_INPUT_CONTEXT

◆ _UAPIHK

Enumerator
uahLoadInit 
uahStop 
uahShutdown 

Definition at line 369 of file undocuser.h.

370{
372 uahStop,
374} UAPIHK, *PUAPIHK;
enum _UAPIHK UAPIHK
enum _UAPIHK * PUAPIHK
@ uahStop
Definition: undocuser.h:372
@ uahLoadInit
Definition: undocuser.h:371
@ uahShutdown
Definition: undocuser.h:373

◆ _UPDATE_INPUT_CONTEXT

Enumerator
UIC_CLIENTIMCDATA 
UIC_IMEWINDOW 

Definition at line 307 of file undocuser.h.

308{
@ UIC_CLIENTIMCDATA
Definition: undocuser.h:309
@ UIC_IMEWINDOW
Definition: undocuser.h:310
enum _UPDATE_INPUT_CONTEXT UPDATE_INPUT_CONTEXT

◆ tagSETIMEHOTKEY_ACTION

Enumerator
SETIMEHOTKEY_DELETE 
SETIMEHOTKEY_ADD 
SETIMEHOTKEY_INITIALIZE 

Definition at line 405 of file undocuser.h.

406{
enum tagSETIMEHOTKEY_ACTION SETIMEHOTKEY_ACTION
@ SETIMEHOTKEY_INITIALIZE
Definition: undocuser.h:409
@ SETIMEHOTKEY_ADD
Definition: undocuser.h:408
@ SETIMEHOTKEY_DELETE
Definition: undocuser.h:407

Function Documentation

◆ C_ASSERT()

C_ASSERT ( sizeof(MSGBOXDATA = =0x48)

◆ CalcChildScroll()

void WINAPI CalcChildScroll ( HWND  hwnd,
INT  scroll 
)

Definition at line 1800 of file mdi.c.

1802{
1804 RECT childRect, clientRect;
1805 HWND *list;
1806 DWORD style;
1807 WINDOWINFO WindowInfo;
1808
1809 GetClientRect( hwnd, &clientRect );
1810 SetRectEmpty( &childRect );
1811
1812 /* The rectangle returned by GetClientRect always has 0,0 as top left
1813 * because it is in client coordinates. The rectangles returned by
1814 * GetWindowRect are in screen coordinates to make this complicated.
1815 *
1816 * Apparently (in ReactOS at least) the rcClient returned by GetWindowInfo
1817 * is in screen coordinates too.
1818 */
1819 WindowInfo.cbSize = sizeof(WindowInfo);
1820 if (!GetWindowInfo(hwnd, &WindowInfo))
1821 {
1822 ERR("Can't get window info\n");
1823 return;
1824 }
1825
1826 TRACE("CalcChildScroll 1\n");
1827 if ((list = WIN_ListChildren( hwnd )))
1828 {
1829 int i;
1830 for (i = 0; list[i]; i++)
1831 {
1833 if (style & WS_MAXIMIZE)
1834 {
1835 HeapFree( GetProcessHeap(), 0, list );
1837 ERR("CalcChildScroll 2\n");
1838 return;
1839 }
1840 if (style & WS_VISIBLE)
1841 {
1842 RECT rect;
1843 GetWindowRect( list[i], &rect );
1844 OffsetRect(&rect, -WindowInfo.rcClient.left,
1845 -WindowInfo.rcClient.top);
1846 //WIN_GetRectangles( list[i], COORDS_PARENT, &rect, NULL );
1847 TRACE("CalcChildScroll L\n");
1848 UnionRect( &childRect, &rect, &childRect );
1849 }
1850 }
1851 HeapFree( GetProcessHeap(), 0, list );
1852 }
1853 UnionRect( &childRect, &clientRect, &childRect );
1854 TRACE("CalcChildScroll 3\n");
1855 /* set common info values */
1856 info.cbSize = sizeof(info);
1857 info.fMask = SIF_POS | SIF_RANGE | SIF_PAGE;
1858 info.nPos = 0;
1859
1860 /* set the specific values and apply but only if window style allows */
1861 /* Note how we set nPos to 0 because we scroll the clients instead of
1862 * the window, and we set nPage to 1 bigger than the clientRect because
1863 * otherwise the scrollbar never disables. This causes a somewhat ugly
1864 * effect though while scrolling.
1865 */
1867 switch( scroll )
1868 {
1869 case SB_BOTH:
1870 case SB_HORZ:
1871 if (style & (WS_HSCROLL | WS_VSCROLL))
1872 {
1873 info.nMin = childRect.left;
1874 info.nMax = childRect.right;
1875 info.nPage = 1 + clientRect.right - clientRect.left;
1876 //info.nMax = childRect.right - clientRect.right;
1877 //info.nPos = clientRect.left - childRect.left;
1879 }
1880 if (scroll == SB_HORZ) break;
1881 /* fall through */
1882 case SB_VERT:
1883 if (style & (WS_HSCROLL | WS_VSCROLL))
1884 {
1885 info.nMin = childRect.top;
1886 info.nMax = childRect.bottom;
1887 info.nPage = 1 + clientRect.bottom - clientRect.top;
1888 //info.nMax = childRect.bottom - clientRect.bottom;
1889 //info.nPos = clientRect.top - childRect.top;
1891 }
1892 break;
1893 }
Arabic default style
Definition: afstyles.h:94
#define ERR(fmt,...)
Definition: precomp.h:57
Definition: list.h:37
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define WS_MAXIMIZE
Definition: pedump.c:623
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_HSCROLL
Definition: pedump.c:628
#define list
Definition: rosglue.h:35
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
RECT rcClient
Definition: winuser.h:3771
DWORD cbSize
Definition: winuser.h:3769
HWND * WIN_ListChildren(HWND hWndparent)
Definition: mdi.c:139
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define GetWindowLongPtrW
Definition: winuser.h:4832
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SIF_RANGE
Definition: winuser.h:1238
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
#define SB_VERT
Definition: winuser.h:553
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define SIF_PAGE
Definition: winuser.h:1236
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SB_BOTH
Definition: winuser.h:555
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
#define SIF_POS
Definition: winuser.h:1237
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
BOOL WINAPI UnionRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define GWL_STYLE
Definition: winuser.h:855
#define SB_HORZ
Definition: winuser.h:552

Referenced by MDIClientWndProc_common(), and ScrollChildren().

◆ CliImmSetHotKey()

BOOL WINAPI CliImmSetHotKey ( DWORD  dwID,
UINT  uModifiers,
UINT  uVirtualKey,
HKL  hKl 
)

Definition at line 265 of file input.c.

266{
267 BOOL ret;
268
269 if (uVirtualKey == 0) // Delete?
270 {
271 ret = CliSaveImeHotKey(dwID, uModifiers, uVirtualKey, hKL, TRUE);
272 if (ret)
273 CliImmSetHotKeyWorker(dwID, uModifiers, uVirtualKey, hKL, SETIMEHOTKEY_DELETE);
274 return ret;
275 }
276
277 // Add
278 ret = CliImmSetHotKeyWorker(dwID, uModifiers, uVirtualKey, hKL, SETIMEHOTKEY_ADD);
279 if (ret)
280 {
281 ret = CliSaveImeHotKey(dwID, uModifiers, uVirtualKey, hKL, FALSE);
282 if (!ret) // Failure?
283 CliImmSetHotKeyWorker(dwID, uModifiers, uVirtualKey, hKL, SETIMEHOTKEY_DELETE);
284 }
285
286 return ret;
287}
unsigned int BOOL
Definition: ntddk_ex.h:94
int ret
BOOL APIENTRY CliImmSetHotKeyWorker(DWORD dwHotKeyId, UINT uModifiers, UINT uVirtualKey, HKL hKL, DWORD dwAction)
Definition: input.c:111
BOOL APIENTRY CliSaveImeHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKL, BOOL bDelete)
Definition: input.c:210

◆ CsrBroadcastSystemMessageExW()

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:6

◆ DrawCaptionTempA()

BOOL WINAPI DrawCaptionTempA ( HWND  hwnd,
HDC  hdc,
const RECT rect,
HFONT  hFont,
HICON  hIcon,
LPCSTR  str,
UINT  uFlags 
)

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 {
245 }
246 return ret;
247}
HFONT hFont
Definition: main.c:53
#define NULL
Definition: types.h:112
UINT uFlags
Definition: api.c:59
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
HDC hdc
Definition: main.c:9
WCHAR strW[12]
Definition: clipboard.c:2029
HICON hIcon
Definition: msconfig.c:44
const WCHAR * str
int32_t INT
Definition: typedefs.h:58
BOOL WINAPI DrawCaptionTempW(HWND hWnd, HDC hDC, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags)
Definition: nonclient.c:202
#define DC_TEXT
Definition: winuser.h:430
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ DrawCaptionTempW()

BOOL WINAPI DrawCaptionTempW ( HWND  hWnd,
HDC  hDC,
const RECT rect,
HFONT  hFont,
HICON  hIcon,
LPCWSTR  str,
UINT  uFlags 
)

Definition at line 202 of file nonclient.c.

211{
212 UNICODE_STRING Text = {0};
215}
static HDC hDC
Definition: 3dtext.c:33
HWND hWnd
Definition: settings.c:17
char * Text
Definition: combotst.c:136
BOOL NTAPI NtUserDrawCaptionTemp(HWND hWnd, HDC hDC, LPCRECT lpRc, HFONT hFont, HICON hIcon, const PUNICODE_STRING str, UINT uFlags)
Definition: painting.c:2374
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)

Referenced by DrawCaptionTempA().

◆ GetAppCompatFlags()

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:352
DWORD dwCompatFlags
Definition: ntuser.h:322

◆ GetAppCompatFlags2()

DWORD WINAPI GetAppCompatFlags2 ( HTASK  hTask)

Definition at line 63 of file stubs.c.

64{
66
67 return pci->dwCompatFlags2;
68}
DWORD dwCompatFlags2
Definition: ntuser.h:323

◆ GetProgmanWindow()

HWND WINAPI GetProgmanWindow ( VOID  )

Definition at line 1898 of file window.c.

1899{
1901}
@ THREADSTATE_PROGMANWINDOW
Definition: ntuser.h:2491
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
Definition: misc.c:240

◆ GetTaskmanWindow()

HWND WINAPI GetTaskmanWindow ( VOID  )

Definition at line 1907 of file window.c.

1908{
1910}
@ THREADSTATE_TASKMANWINDOW
Definition: ntuser.h:2492

Referenced by UserpShowInformationBalloon().

◆ KillSystemTimer()

BOOL WINAPI KillSystemTimer ( HWND  hWnd,
UINT_PTR  IDEvent 
)

Definition at line 35 of file timer.c.

36{
37 return NtUserxKillSystemTimer(hWnd, IDEvent);
38}
EXTINLINE BOOL NtUserxKillSystemTimer(HWND hWnd, UINT_PTR IDEvent)
Definition: ntwrapper.h:711

◆ MB_GetString()

LPCWSTR WINAPI MB_GetString ( IN UINT  wBtn)

Definition at line 1345 of file messagebox.c.

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}
#define IDS_OK
Definition: resource.h:19
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define MAX_MB_STRINGS
Definition: ntuser.h:946
#define ASSERT(a)
Definition: mode.c:44
unsigned int UINT
Definition: ndis.h:50
static const WCHAR szName[]
Definition: powrprof.c:45
UINT uStr
Definition: ntuser.h:979
UINT uID
Definition: ntuser.h:978
WCHAR szName[16]
Definition: ntuser.h:977
HINSTANCE User32Instance
Definition: dllmain.c:27
#define IDCONTINUE
Definition: vfdguiut.c:42
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IDOK
Definition: winuser.h:833

Referenced by MessageBoxTimeoutIndirectW().

◆ MessageBoxTimeoutA()

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))
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
1284
1285 if (!IS_INTRESOURCE(textW.Buffer))
1287
1288 if (!IS_INTRESOURCE(captionW.Buffer))
1289 RtlFreeUnicodeString(&captionW);
1290
1291 return ret;
1292}
static const WCHAR textW[]
Definition: itemdlg.c:1559
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
DWORD dwLanguageId
Definition: winuser.h:3348
LPCWSTR lpszCaption
Definition: winuser.h:3343
DWORD_PTR dwContextHelpId
Definition: winuser.h:3346
HWND hwndOwner
Definition: winuser.h:3340
LPCWSTR lpszIcon
Definition: winuser.h:3345
MSGBOXCALLBACK lpfnMsgBoxCallback
Definition: winuser.h:3347
LPCWSTR lpszText
Definition: winuser.h:3342
HINSTANCE hInstance
Definition: winuser.h:3341
DWORD dwStyle
Definition: winuser.h:3344
CONST char * PCSZ
Definition: umtypes.h:125
static int MessageBoxTimeoutIndirectW(CONST MSGBOXPARAMSW *lpMsgBoxParams, UINT dwTimeout)
Definition: messagebox.c:449
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081
#define IS_INTRESOURCE(i)
Definition: winuser.h:580

◆ MessageBoxTimeoutW()

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}

◆ PaintMenuBar()

BOOL WINAPI PaintMenuBar ( HWND  hWnd,
HDC  hDC,
ULONG  left,
ULONG  right,
ULONG  top,
BOOL  bActive 
)

Referenced by ThemeDrawMenuBar().

◆ RegisterLogonProcess()

BOOL WINAPI RegisterLogonProcess ( DWORD  dwProcessId,
BOOL  bRegister 
)

Definition at line 43 of file logon.c.

45{
46 gfLogonProcess = NtUserxRegisterLogonProcess(dwProcessId, bRegister);
47
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 CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
EXTINLINE BOOL NtUserxRegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
Definition: ntwrapper.h:831
NTSTATUS NTAPI CsrClientCallServer(_Inout_ PCSR_API_MESSAGE ApiMessage, _Inout_opt_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ CSR_API_NUMBER ApiNumber, _In_ ULONG DataLength)
Definition: connect.c:366
NTSTATUS Status
Definition: csrmsg.h:110
USER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest
Definition: winmsg.h:113
union _USER_API_MESSAGE::@3541 Data
BOOLEAN gfLogonProcess
Definition: dllmain.c:34
VOID WINAPI UserSetLastNTError(IN NTSTATUS Status)
Definition: misc.c:25
@ UserpRegisterLogonProcess
Definition: winmsg.h:28
#define USERSRV_SERVERDLL_INDEX
Definition: winmsg.h:15

◆ RegisterUserApiHook()

BOOL WINAPI RegisterUserApiHook ( HINSTANCE  hInstance,
USERAPIHOOKPROC  CallbackFunc 
)

◆ ScrollChildren()

VOID WINAPI ScrollChildren ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1899 of file mdi.c.

1902{
1903 INT newPos = -1;
1904 INT curPos, length, minPos, maxPos, shift;
1905 RECT rect;
1906
1907 GetClientRect( hWnd, &rect );
1908
1909 switch(uMsg)
1910 {
1911 case WM_HSCROLL:
1912 GetScrollRange(hWnd,SB_HORZ,&minPos,&maxPos);
1913 curPos = GetScrollPos(hWnd,SB_HORZ);
1914 length = (rect.right - rect.left) / 2;
1916 break;
1917 case WM_VSCROLL:
1918 GetScrollRange(hWnd,SB_VERT,&minPos,&maxPos);
1919 curPos = GetScrollPos(hWnd,SB_VERT);
1920 length = (rect.bottom - rect.top) / 2;
1922 break;
1923 default:
1924 return;
1925 }
1926
1927 switch( wParam )
1928 {
1929 case SB_LINEUP:
1930 newPos = curPos - shift;
1931 break;
1932 case SB_LINEDOWN:
1933 newPos = curPos + shift;
1934 break;
1935 case SB_PAGEUP:
1936 newPos = curPos - length;
1937 break;
1938 case SB_PAGEDOWN:
1939 newPos = curPos + length;
1940 break;
1941
1942 case SB_THUMBPOSITION:
1943 newPos = LOWORD(lParam);
1944 break;
1945
1946 case SB_THUMBTRACK:
1947 return;
1948
1949 case SB_TOP:
1950 newPos = minPos;
1951 break;
1952 case SB_BOTTOM:
1953 newPos = maxPos;
1954 break;
1955 case SB_ENDSCROLL:
1957 return;
1958 }
1959
1960 if( newPos > maxPos )
1961 newPos = maxPos;
1962 else
1963 if( newPos < minPos )
1964 newPos = minPos;
1965
1966 SetScrollPos(hWnd, (uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ , newPos, TRUE);
1967
1968 if( uMsg == WM_VSCROLL )
1969 ScrollWindowEx(hWnd ,0 ,curPos - newPos, NULL, NULL, 0, NULL,
1971 else
1972 ScrollWindowEx(hWnd ,curPos - newPos, 0, NULL, NULL, 0, NULL,
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
#define shift
Definition: input.c:1755
#define LOWORD(l)
Definition: pedump.c:82
void WINAPI CalcChildScroll(HWND hwnd, INT scroll)
Definition: mdi.c:1800
#define SB_THUMBTRACK
Definition: winuser.h:573
#define SB_LINEUP
Definition: winuser.h:564
#define WM_HSCROLL
Definition: winuser.h:1746
#define WM_VSCROLL
Definition: winuser.h:1747
#define SW_SCROLLCHILDREN
Definition: winuser.h:2581
#define SM_CXVSCROLL
Definition: winuser.h:964
#define SB_BOTTOM
Definition: winuser.h:577
#define SW_INVALIDATE
Definition: winuser.h:2582
int WINAPI SetScrollPos(_In_ HWND, _In_ int, _In_ int, _In_ BOOL)
#define SM_CYHSCROLL
Definition: winuser.h:965
BOOL WINAPI GetScrollRange(_In_ HWND, _In_ int, _Out_ LPINT, _Out_ LPINT)
#define SB_PAGEDOWN
Definition: winuser.h:569
#define SB_LINEDOWN
Definition: winuser.h:565
#define SB_TOP
Definition: winuser.h:578
#define SW_ERASE
Definition: winuser.h:2583
#define SB_ENDSCROLL
Definition: winuser.h:574
int WINAPI GetScrollPos(_In_ HWND, _In_ int)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
#define SB_PAGEUP
Definition: winuser.h:568
#define SB_THUMBPOSITION
Definition: winuser.h:572

Referenced by MDIClientWndProc_common().

◆ SetDeskWallPaper()

BOOL WINAPI SetDeskWallPaper ( LPCSTR  )

◆ SetLogonNotifyWindow()

BOOL WINAPI SetLogonNotifyWindow ( HWND  Wnd)

Definition at line 91 of file logon.c.

92{
94}
BOOL NTAPI NtUserSetLogonNotifyWindow(HWND hWnd)
Definition: winsta.c:1953

Referenced by InitializeSAS().

◆ SetShellWindow()

BOOL WINAPI SetShellWindow ( HWND  hwndShell)

Definition at line 641 of file desktop.c.

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

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

◆ SetShellWindowEx()

BOOL WINAPI SetShellWindowEx ( HWND  hwndShell,
HWND  hwndShellListView 
)

Definition at line 58 of file ntwrapper.h.

59{
60 return NtUserSetShellWindowEx(hwndShell, hwndShellListView);
61}
BOOL NTAPI NtUserSetShellWindowEx(HWND hwndShell, HWND hwndShellListView)
Definition: window.c:3717

Referenced by DesktopWindow::Init(), IsAnyDesktopRunning(), CDefView::OnCreate(), and SetShellWindow().

◆ SetSysColorsTemp()

DWORD_PTR WINAPI SetSysColorsTemp ( const COLORREF pPens,
const HBRUSH *  pBrushes,
DWORD_PTR  n 
)

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}
pKey DeleteObject()
GLdouble n
Definition: glext.h:7729
GLfloat GLfloat p
Definition: glext.h:8902
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define LPVOID
Definition: nt_native.h:45
uint32_t DWORD_PTR
Definition: typedefs.h:65
static HBRUSH SysColorBrushes[COLOR_MENUBAR+1]
Definition: stubs.c:147
static HPEN SysColorPens[COLOR_MENUBAR+1]
Definition: stubs.c:146
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define PS_SOLID
Definition: wingdi.h:586

◆ SetSystemTimer()

UINT_PTR WINAPI SetSystemTimer ( HWND  hWnd,
UINT_PTR  IDEvent,
UINT  Period,
TIMERPROC  TimerFunc 
)

Definition at line 106 of file ntwrapper.h.

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

◆ SetTaskmanWindow()

HWND WINAPI SetTaskmanWindow ( HWND  hWnd)

Definition at line 1880 of file window.c.

1881{
1883}
EXTINLINE HWND NtUserxSetTaskmanWindow(HWND hWnd)
Definition: ntwrapper.h:758

Referenced by RegisterShellHook().

◆ SoftModalMessageBox()

int WINAPI SoftModalMessageBox ( IN LPMSGBOXDATA  lpMsgBoxData)

Definition at line 617 of file messagebox.c.

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:
694 break;
695 case MB_ICONQUESTION:
698 break;
699 case MB_ICONASTERISK: // case MB_ICONINFORMATION:
702 break;
703 case MB_ICONHAND: // case MB_ICONSTOP: case MB_ICONERROR:
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 {
733 bufsize += sizeof(DLGITEMTEMPLATE) +
734 4 * sizeof(WORD) +
735 sizeof(WCHAR);
736 }
737
738 /* Space for the text */
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
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
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??
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)
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
869#endif
870 btnleft = MSGBOXEX_MARGIN;
871 }
872 else
873 {
875 btnleft = MSGBOXEX_MARGIN + ((txtrect.right + rc.right + MSGBOXEX_SPACING - btnleft) / 2);
876 }
877
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
895#endif
896 btnleft = MSGBOXEX_MARGIN;
897 }
898 else
899 {
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 {
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 */
965 itxt = (DLGITEMTEMPLATE *)dest;
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
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
1053Quit:
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}
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
const WCHAR * text
Definition: package.c:1794
#define PtrToUlong(u)
Definition: config.h:107
unsigned short WORD
Definition: ntddk_ex.h:93
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLfloat units
Definition: glext.h:11727
GLenum GLuint GLsizei bufsize
Definition: glext.h:7473
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static HDC
Definition: imagelist.c:88
static HICON
Definition: imagelist.c:80
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static char * dest
Definition: rtl.c:135
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
#define L(x)
Definition: ntvdm.h:50
#define WS_CHILD
Definition: pedump.c:617
#define WS_CAPTION
Definition: pedump.c:624
#define WS_EX_DLGMODALFRAME
Definition: pedump.c:645
#define WS_TABSTOP
Definition: pedump.c:634
#define WS_SYSMENU
Definition: pedump.c:629
#define SS_RIGHT
Definition: pedump.c:694
#define WS_POPUP
Definition: pedump.c:616
#define WS_EX_TOPMOST
Definition: pedump.c:647
#define SS_LEFT
Definition: pedump.c:692
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define BS_PUSHBUTTON
Definition: pedump.c:651
#define BS_DEFPUSHBUTTON
Definition: pedump.c:652
#define SS_ICON
Definition: pedump.c:695
#define wine_dbgstr_wn
Definition: testlist.c:2
POINT iconPos
Definition: startmenu.cpp:1391
DWORD dwExtendedStyle
Definition: winuser.h:3053
WORD cdit
Definition: winuser.h:3064
short y
Definition: winuser.h:3066
short cy
Definition: winuser.h:3068
DWORD style
Definition: winuser.h:3062
DWORD dwExtendedStyle
Definition: winuser.h:3063
short x
Definition: winuser.h:3065
short cx
Definition: winuser.h:3067
DWORD dwButtons
Definition: messagebox.c:33
INT * pidButton
Definition: messagebox.c:31
LPCWSTR * ppszButtonText
Definition: messagebox.c:32
UINT uDefButton
Definition: messagebox.c:34
MSGBOXPARAMSW mbp
Definition: messagebox.c:25
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define max(a, b)
Definition: svc.c:63
#define HIWORD(l)
Definition: typedefs.h:247
#define ALIGN_UP(size, type)
Definition: umtypes.h:91
#define ALIGN_UP_POINTER(ptr, type)
Definition: umtypes.h:97
static UINT LoadAllocStringW(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, OUT PWSTR *pString, IN PCWSTR pDefaultString OPTIONAL)
Definition: messagebox.c:108
BOOL WINAPI MessageBeep(IN UINT uType)
Definition: messagebox.c:1329
#define MSGBOXEX_MARGIN
Definition: messagebox.c:58
#define RESCALE_Y(_y, _units)
Definition: messagebox.c:64
#define MSGBOX_IDTEXT
Definition: messagebox.c:42
static INT_PTR CALLBACK MessageBoxProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: messagebox.c:248
#define BTN_CX
Definition: messagebox.c:53
#define MSGBOX_IDICON
Definition: messagebox.c:41
#define IDI_HANDW
Definition: messagebox.c:44
#define RESCALE_X(_x, _units)
Definition: messagebox.c:63
#define IDI_QUESTIONW
Definition: messagebox.c:45
#define IDI_ASTERISKW
Definition: messagebox.c:47
#define BTN_CY
Definition: messagebox.c:54
#define MSGBOXEX_SPACING
Definition: messagebox.c:56
#define MSGBOXEX_BUTTONSPACING
Definition: messagebox.c:57
#define IDI_EXCLAMATIONW
Definition: messagebox.c:46
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
LONG_PTR LPARAM
Definition: windef.h:208
LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *)
Definition: font.c:2145
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define MB_TOPMOST
Definition: winuser.h:828
#define DT_NOPREFIX
Definition: winuser.h:537
#define MB_RIGHT
Definition: winuser.h:798
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define DT_EXTERNALLEADING
Definition: winuser.h:533
#define DCX_CACHE
Definition: winuser.h:2117
#define DCX_WINDOW
Definition: winuser.h:2116
#define MB_ICONHAND
Definition: winuser.h:791
#define DS_NOIDLEMSG
Definition: winuser.h:377
#define WS_EX_CONTROLPARENT
Definition: winuser.h:387
#define DT_SINGLELINE
Definition: winuser.h:540
#define SS_NOPREFIX
Definition: winuser.h:350
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
#define DS_MODALFRAME
Definition: winuser.h:375
#define MB_ICONMASK
Definition: winuser.h:822
#define DT_LEFT
Definition: winuser.h:534
#define SM_CYICON
Definition: winuser.h:976
#define DT_WORDBREAK
Definition: winuser.h:544
#define DS_CENTER
Definition: winuser.h:369
#define DS_SETFONT
Definition: winuser.h:378
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define MB_ICONEXCLAMATION
Definition: winuser.h:788
#define MB_OK
Definition: winuser.h:793
LONG WINAPI GetDialogBaseUnits(void)
Definition: dialog.c:2144
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define MB_USERICON
Definition: winuser.h:786
#define MB_ICONQUESTION
Definition: winuser.h:792
#define SM_CXSCREEN
Definition: winuser.h:962
#define DT_EXPANDTABS
Definition: winuser.h:532
#define DT_CALCRECT
Definition: winuser.h:526
#define MB_ICONASTERISK
Definition: winuser.h:787
#define DT_EDITCONTROL
Definition: winuser.h:528
#define SM_CXICON
Definition: winuser.h:975
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2127
#define WS_EX_RIGHT
Definition: winuser.h:400
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193

Referenced by MessageBoxTimeoutIndirectW(), and TestSoftModalMsgBox().

◆ UnregisterUserApiHook()

BOOL WINAPI UnregisterUserApiHook ( VOID  )

Definition at line 394 of file usrapihk.c.

395{
397}
BOOL NTAPI NtUserUnregisterUserApiHook(VOID)
Definition: hook.c:1768

Referenced by ThemeHooksRemove().

◆ UpdatePerUserSystemParameters()

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
107 /* Initialize the IME hotkeys */
109
110 /* Load Preload keyboard layouts */
112
114}
BOOL NTAPI NtUserUpdatePerUserSystemParameters(DWORD dwReserved, BOOL bEnable)
Definition: sysparams.c:375
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
VOID APIENTRY CliImmInitializeHotKeys(DWORD dwAction, HKL hKL)
Definition: input.c:402
BOOL WINAPI UpdatePerUserImmEnabling(VOID)
Definition: imm.c:1102
VOID IntLoadPreloadKeyboardLayouts(VOID)
Definition: input.c:148
_In_ BOOL bEnable
Definition: winddi.h:3426