* Sync up to trunk HEAD (r62286).
[reactos.git] / dll / cpl / intl / generalp.c
index 398b153..8fadb89 100644 (file)
@@ -161,23 +161,21 @@ SetNewLocale(LCID lcid)
     ret = GetLocaleInfo(MAKELCID(lcid, SORT_DEFAULT), LOCALE_IDEFAULTCODEPAGE, OEMPage, sizeof(OEMPage)/sizeof(TCHAR));
     if (ret == 0)
     {
-        MessageBox(NULL, _T("Problem reading OEM code page"), _T("Big Problem"), MB_OK);
+        PrintErrorMsgBox(IDS_ERROR_OEM_CODE_PAGE);
         return;
     }
 
     ret = GetLocaleInfo(MAKELCID(lcid, SORT_DEFAULT), LOCALE_IDEFAULTANSICODEPAGE, ACPPage, sizeof(ACPPage)/sizeof(TCHAR));
     if (ret == 0)
     {
-        MessageBox(NULL, _T("Problem reading ANSI code page"), _T("Big Problem"), MB_OK);
+        PrintErrorMsgBox(IDS_ERROR_ANSI_CODE_PAGE);
         return;
     }
 
     ret = RegOpenKey(HKEY_CURRENT_USER, _T("Control Panel\\International"), &localeKey);
     if (ret != ERROR_SUCCESS)
     {
-        // Some serious error
-        MessageBox(NULL, _T("Problem opening HKCU\\Control Panel\\International key"),
-                   _T("Big Problem"), MB_OK);
+        PrintErrorMsgBox(IDS_ERROR_INT_KEY_REG);
         return;
     }
 
@@ -190,9 +188,7 @@ SetNewLocale(LCID lcid)
     ret = RegOpenKey(HKEY_USERS, _T(".DEFAULT\\Control Panel\\International"), &localeKey);
     if (ret != ERROR_SUCCESS)
     {
-        // Some serious error
-        MessageBox(NULL, _T("Problem opening HKU\\.DEFAULT\\Control Panel\\International key"),
-                   _T("Big Problem"), MB_OK);
+        PrintErrorMsgBox(IDS_ERROR_DEF_INT_KEY_REG);
         return;
     }
 
@@ -206,8 +202,7 @@ SetNewLocale(LCID lcid)
     ret = RegOpenKey(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Control\\NLS\\Language"), &langKey);
     if (ret != ERROR_SUCCESS)
     {
-        MessageBoxW(NULL, _T("Problem opening HKLM\\SYSTEM\\CurrentControlSet\\Control\\NLS\\Language key"),
-                    _T("Big Problem"), MB_OK);
+        PrintErrorMsgBox(IDS_ERROR_NLS_KEY_REG);
         return;
     }
 
@@ -221,8 +216,7 @@ SetNewLocale(LCID lcid)
     ret = RegOpenKey(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage"), &langKey);
     if (ret != ERROR_SUCCESS)
     {
-        MessageBox(NULL, _T("Problem opening HKLM\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage key"),
-                   _T("Big Problem"), MB_OK);
+        PrintErrorMsgBox(IDS_ERROR_NLS_CODE_REG);
         return;
     }