X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2Fuser32%2Fwindows%2Fmessagebox.c;h=54795ff7e702622ec3212054c1b5c182ddc2f2ae;hp=a98c2ded40f8a06ad6db8aab5995ad4e02abddf1;hb=26846ce596a28988a3b8f0fd507fcb94f0c09e77;hpb=fca11cd62d1264e9e525812c62a1b4d7ab91946b;ds=sidebyside diff --git a/reactos/lib/user32/windows/messagebox.c b/reactos/lib/user32/windows/messagebox.c index a98c2ded40f..54795ff7e70 100644 --- a/reactos/lib/user32/windows/messagebox.c +++ b/reactos/lib/user32/windows/messagebox.c @@ -196,7 +196,6 @@ MessageBoxTimeoutIndirectW( DLGITEMTEMPLATE *iico, *itxt; NONCLIENTMETRICSW nclm; WCHAR capbuf[32]; - HMODULE hUser32; LPVOID buf; BYTE *dest; LPCWSTR caption, text; @@ -213,11 +212,9 @@ MessageBoxTimeoutIndirectW( BOOL defbtn = FALSE; DWORD units = GetDialogBaseUnits(); - hUser32 = GetModuleHandleW(L"USER32"); - if(!lpMsgBoxParams->lpszCaption || !HIWORD((LPWSTR)lpMsgBoxParams->lpszCaption)) { - LoadStringW(hUser32, IDS_ERROR, &capbuf[0], 32); + LoadStringW(User32Instance, IDS_ERROR, &capbuf[0], 32); caption = &capbuf[0]; } else @@ -335,34 +332,34 @@ MessageBoxTimeoutIndirectW( switch(Buttons[i]) { case IDOK: - LoadStringW(hUser32, IDS_OK, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_OK, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDCANCEL: - LoadStringW(hUser32, IDS_CANCEL, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_CANCEL, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDYES: - LoadStringW(hUser32, IDS_YES, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_YES, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDNO: - LoadStringW(hUser32, IDS_NO, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_NO, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDTRYAGAIN: - LoadStringW(hUser32, IDS_TRYAGAIN, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_TRYAGAIN, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDCONTINUE: - LoadStringW(hUser32, IDS_CONTINUE, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_CONTINUE, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDABORT: - LoadStringW(hUser32, IDS_ABORT, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_ABORT, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDRETRY: - LoadStringW(hUser32, IDS_RETRY, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_RETRY, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDIGNORE: - LoadStringW(hUser32, IDS_IGNORE, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_IGNORE, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; case IDHELP: - LoadStringW(hUser32, IDS_HELP, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); + LoadStringW(User32Instance, IDS_HELP, ButtonText[i], MSGBOXEX_MAXBTNSTR - 1); break; default: ButtonText[i][0] = (WCHAR)0;