Convert MessageBox family functions to unicode
Dmitry Timoshkov
dmitry at baikal.ru
Sat Oct 19 21:55:09 CDT 2002
Hello.
Changelog:
Restore setting of caption "Error".
--- cvs/hq/wine/windows/msgbox.c Sun Oct 20 11:08:07 2002
+++ wine/windows/msgbox.c Sun Oct 20 11:47:53 2002
@@ -61,8 +61,15 @@
if (HIWORD(lpmb->lpszCaption)) {
SetWindowTextW(hwnd, lpmb->lpszCaption);
} else {
- if (LoadStringW(lpmb->hInstance, LOWORD(lpmb->lpszCaption), buf, 256))
- SetWindowTextW(hwnd, buf);
+ static const WCHAR errorW[] = { 'E','r','r','o','r',0 };
+ UINT res_id = LOWORD(lpmb->lpszCaption);
+ if (res_id)
+ {
+ if (LoadStringW(lpmb->hInstance, res_id, buf, 256))
+ SetWindowTextW(hwnd, buf);
+ }
+ else
+ SetWindowTextW(hwnd, errorW);
}
if (HIWORD(lpmb->lpszText)) {
lpszText = lpmb->lpszText;
More information about the wine-patches
mailing list