shlwapi: Don't limit text size for message boxes from ShellMessageBoxWrapW.
This commit is contained in:
parent
94ce29e4ea
commit
1b105553d7
|
@ -4487,8 +4487,8 @@ DWORD WINAPI GetUIVersion(void)
|
||||||
INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
|
INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
|
||||||
LPCWSTR lpCaption, UINT uType, ...)
|
LPCWSTR lpCaption, UINT uType, ...)
|
||||||
{
|
{
|
||||||
WCHAR szText[100], szTitle[100];
|
WCHAR *szText = NULL, szTitle[100];
|
||||||
LPCWSTR pszText = szText, pszTitle = szTitle;
|
LPCWSTR pszText, pszTitle = szTitle;
|
||||||
LPWSTR pszTemp;
|
LPWSTR pszTemp;
|
||||||
__ms_va_list args;
|
__ms_va_list args;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -4503,7 +4503,16 @@ INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
|
||||||
pszTitle = lpCaption;
|
pszTitle = lpCaption;
|
||||||
|
|
||||||
if (IS_INTRESOURCE(lpText))
|
if (IS_INTRESOURCE(lpText))
|
||||||
LoadStringW(hInstance, LOWORD(lpText), szText, sizeof(szText)/sizeof(szText[0]));
|
{
|
||||||
|
const WCHAR *ptr;
|
||||||
|
UINT len = LoadStringW(hInstance, LOWORD(lpText), (LPWSTR)&ptr, 0);
|
||||||
|
if (len)
|
||||||
|
{
|
||||||
|
szText = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
|
||||||
|
if (szText) LoadStringW(hInstance, LOWORD(lpText), szText, len + 1);
|
||||||
|
}
|
||||||
|
pszText = szText;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
pszText = lpText;
|
pszText = lpText;
|
||||||
|
|
||||||
|
@ -4513,6 +4522,8 @@ INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
|
||||||
__ms_va_end(args);
|
__ms_va_end(args);
|
||||||
|
|
||||||
ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType);
|
ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType);
|
||||||
|
|
||||||
|
HeapFree(GetProcessHeap(), 0, szText);
|
||||||
LocalFree(pszTemp);
|
LocalFree(pszTemp);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue