--- trunk/reactos/lib/user32/windows/mdi.c 2005-12-12 21:31:19 UTC (rev 20121)
+++ trunk/reactos/lib/user32/windows/mdi.c 2005-12-12 21:34:32 UTC (rev 20122)
@@ -349,7 +349,7 @@
if (clientInfo->nActiveChildren - 1 > MDI_MOREWINDOWSLIMIT)
{
WCHAR szTmp[50];
- LoadStringW(GetModuleHandleA("USER32"), IDS_MDI_MOREWINDOWS, szTmp, sizeof(szTmp)/sizeof(szTmp[0]));
+ LoadStringW(User32Instance, IDS_MDI_MOREWINDOWS, szTmp, sizeof(szTmp)/sizeof(szTmp[0]));
AppendMenuW(clientInfo->hWindowMenu, MF_STRING, clientInfo->idFirstChild + MDI_MOREWINDOWSLIMIT, szTmp);
}
return TRUE;
@@ -680,7 +680,7 @@
if (ci->nActiveChildren == MDI_MOREWINDOWSLIMIT + 1)
{
WCHAR szTmp[50];
- LoadStringW(GetModuleHandleA("USER32"), IDS_MDI_MOREWINDOWS, szTmp, sizeof(szTmp)/sizeof(szTmp[0]));
+ LoadStringW(User32Instance, IDS_MDI_MOREWINDOWS, szTmp, sizeof(szTmp)/sizeof(szTmp[0]));
ModifyMenuW(ci->hWindowMenu,
ci->idFirstChild + MDI_MOREWINDOWSLIMIT,
@@ -2391,12 +2391,12 @@
HRSRC hRes;
HANDLE hDlgTmpl;
- hRes = FindResourceA(GetModuleHandleA("USER32"), "MDI_MOREWINDOWS", (LPSTR)RT_DIALOG);
+ hRes = FindResourceA(User32Instance, "MDI_MOREWINDOWS", (LPSTR)RT_DIALOG);
if (hRes == 0)
return 0;
- hDlgTmpl = LoadResource(GetModuleHandleA("USER32"), hRes );
+ hDlgTmpl = LoadResource(User32Instance, hRes);
if (hDlgTmpl == 0)
return 0;
@@ -2406,7 +2406,7 @@
if (template == 0)
return 0;
- return (HWND) DialogBoxIndirectParamA(GetModuleHandleA("USER32"),
+ return (HWND) DialogBoxIndirectParamA(User32Instance,
(LPDLGTEMPLATE) template,
hwnd, MDI_MoreWindowsDlgProc, (LPARAM) hwnd);
}
--- trunk/reactos/lib/user32/windows/messagebox.c 2005-12-12 21:31:19 UTC (rev 20121)
+++ trunk/reactos/lib/user32/windows/messagebox.c 2005-12-12 21:34:32 UTC (rev 20122)
@@ -196,7 +196,6 @@
DLGITEMTEMPLATE *iico, *itxt;
NONCLIENTMETRICSW nclm;
WCHAR capbuf[32];
- HMODULE hUser32;
LPVOID buf;
BYTE *dest;
LPCWSTR caption, text;
@@ -213,11 +212,9 @@
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 @@
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;