msvcrt: Pass wide char caption string to MessageBoxIndirectW.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2016-12-22 15:06:35 -07:00 committed by Alexandre Julliard
parent 00c47a2a09
commit df37daf175
1 changed files with 4 additions and 4 deletions

View File

@ -41,8 +41,6 @@ typedef struct MSVCRT__onexit_table_t
MSVCRT__onexit_t *_end;
} MSVCRT__onexit_table_t;
static const char szMsgBoxTitle[] = "Wine C++ Runtime Library";
extern int MSVCRT_app_type;
extern MSVCRT_wchar_t *MSVCRT__wpgmptr;
@ -116,6 +114,8 @@ static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *mess
'%','s','\n','\n','P','r','e','s','s',' ','O','K',' ','t','o',' ','e','x','i','t',' ','t','h','e',' ',
'p','r','o','g','r','a','m',',',' ','o','r',' ','C','a','n','c','e','l',' ','t','o',' ','s','t','a','r','t',' ',
't','h','e',' ','W','i','n','e',' ','d','e','b','b','u','g','e','r','.','\n',0};
static const WCHAR title[] =
{'W','i','n','e',' ','C','+','+',' ','R','u','n','t','i','m','e',' ','L','i','b','r','a','r','y',0};
MSGBOXPARAMSW msgbox;
MSVCRT_wchar_t text[2048];
@ -126,8 +126,8 @@ static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *mess
msgbox.cbSize = sizeof(msgbox);
msgbox.hwndOwner = GetActiveWindow();
msgbox.hInstance = 0;
msgbox.lpszText = (LPCWSTR)text;
msgbox.lpszCaption = (LPCWSTR)szMsgBoxTitle;
msgbox.lpszText = text;
msgbox.lpszCaption = title;
msgbox.dwStyle = MB_OKCANCEL|MB_ICONERROR;
msgbox.lpszIcon = NULL;
msgbox.dwContextHelpId = 0;