https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ed1de7184c2992932a6384...
commit ed1de7184c2992932a63842bf042d2e08a4d0000 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Tue Feb 20 23:07:11 2018 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Fri Aug 17 17:12:20 2018 +0200
[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(). --- sdk/include/reactos/undocuser.h | 77 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+)
diff --git a/sdk/include/reactos/undocuser.h b/sdk/include/reactos/undocuser.h index f130e6b1a9..7001e985f0 100644 --- a/sdk/include/reactos/undocuser.h +++ b/sdk/include/reactos/undocuser.h @@ -216,6 +216,83 @@ typedef struct _BALLOON_HARD_ERROR_DATA ULONG_PTR MessageOffset; } 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 //