mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 09:50:43 +00:00
[SDK][UNDOCUSER] Add undocumented user32.dll SoftModalMessageBox() definition and its structure MSGBOXDATA.
Documented on http://www.vbforums.com/showthread.php?840593-Message-Box-with-Four-Buttons and augmented from my own testings. In addition, add also MessageBoxTimeoutA/W() and MB_GetString().
This commit is contained in:
parent
7bfd6858fb
commit
ed1de7184c
1 changed files with 77 additions and 0 deletions
|
@ -216,6 +216,83 @@ typedef struct _BALLOON_HARD_ERROR_DATA
|
||||||
ULONG_PTR MessageOffset;
|
ULONG_PTR MessageOffset;
|
||||||
} BALLOON_HARD_ERROR_DATA, *PBALLOON_HARD_ERROR_DATA;
|
} BALLOON_HARD_ERROR_DATA, *PBALLOON_HARD_ERROR_DATA;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Undocumented SoftModalMessageBox() API, which constitutes
|
||||||
|
// the basis of all implementations of the MessageBox*() APIs.
|
||||||
|
//
|
||||||
|
typedef struct _MSGBOXDATA
|
||||||
|
{
|
||||||
|
MSGBOXPARAMSW mbp; // Size: 0x28 (on x86), 0x50 (on x64)
|
||||||
|
HWND hwndOwner;
|
||||||
|
#if defined(_WIN32) && (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
|
||||||
|
DWORD dwPadding;
|
||||||
|
#endif
|
||||||
|
WORD wLanguageId;
|
||||||
|
INT* pidButton; // Array of button IDs
|
||||||
|
LPCWSTR* ppszButtonText; // Array of button text strings
|
||||||
|
DWORD dwButtons; // Number of buttons
|
||||||
|
UINT uDefButton; // Default button ID
|
||||||
|
UINT uCancelId; // Button ID for Cancel action
|
||||||
|
#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) /* (NTDDI_VERSION >= NTDDI_WINXP) */
|
||||||
|
DWORD dwTimeout; // Message box timeout
|
||||||
|
#endif
|
||||||
|
DWORD dwReserved0;
|
||||||
|
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
|
||||||
|
DWORD dwReserved[4];
|
||||||
|
#endif
|
||||||
|
} MSGBOXDATA, *PMSGBOXDATA, *LPMSGBOXDATA;
|
||||||
|
|
||||||
|
#if defined(_WIN64)
|
||||||
|
|
||||||
|
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
|
||||||
|
C_ASSERT(sizeof(MSGBOXDATA) == 0x98);
|
||||||
|
#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03) /* (NTDDI_VERSION <= NTDDI_WS03) */
|
||||||
|
C_ASSERT(sizeof(MSGBOXDATA) == 0x88);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#if (_WIN32_WINNT <= _WIN32_WINNT_WIN2K) /* (NTDDI_VERSION <= NTDDI_WIN2KSP4) */
|
||||||
|
C_ASSERT(sizeof(MSGBOXDATA) == 0x48);
|
||||||
|
#elif (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
|
||||||
|
C_ASSERT(sizeof(MSGBOXDATA) == 0x60);
|
||||||
|
#else // (_WIN32_WINNT == _WIN32_WINNT_WINXP || _WIN32_WINNT == _WIN32_WINNT_WS03) /* (NTDDI_VERSION == NTDDI_WS03) */
|
||||||
|
C_ASSERT(sizeof(MSGBOXDATA) == 0x4C);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* defined(_WIN64) */
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define MessageBoxTimeout MessageBoxTimeoutW
|
||||||
|
#else
|
||||||
|
#define MessageBoxTimeout MessageBoxTimeoutA
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LPCWSTR WINAPI MB_GetString(IN UINT wBtn);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// User api hook
|
// User api hook
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue