[CONSOLE.CPL]: Paint the text samples using the correct character set (derived from...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 17 Apr 2017 23:26:07 +0000 (23:26 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 17 Apr 2017 23:26:07 +0000 (23:26 +0000)
This e.g. fixes display for the backslash symbol in CJK languages (that should appear as the Chinese "yuan" / Japanese "yen" currency symbol ¥, or the Korean "won" currency symbol ₩).
CORE-12451

svn path=/trunk/; revision=74366

reactos/dll/cpl/console/layout.c
reactos/dll/cpl/console/options.c

index 43ed500..19c56b9 100644 (file)
@@ -131,7 +131,7 @@ PaintText(LPDRAWITEMSTRUCT drawItem,
                        FALSE,
                        FALSE,
                        FALSE,
-                       OEM_CHARSET,
+                       CodePageToCharSet(pConInfo->CodePage),
                        OUT_DEFAULT_PRECIS,
                        CLIP_DEFAULT_PRECIS,
                        DEFAULT_QUALITY,
@@ -233,11 +233,11 @@ LayoutProc(HWND hwndDlg,
 
         case WM_NOTIFY:
         {
-            LPNMUPDOWN  lpnmud =  (LPNMUPDOWN)lParam;
-            LPPSHNOTIFY lppsn  = (LPPSHNOTIFY)lParam;
+            LPPSHNOTIFY lppsn = (LPPSHNOTIFY)lParam;
 
             if (lppsn->hdr.code == UDN_DELTAPOS)
             {
+                LPNMUPDOWN lpnmud = (LPNMUPDOWN)lParam;
                 DWORD wheight, wwidth;
                 DWORD sheight, swidth;
                 DWORD left, top;
index b450848..ec97f96 100644 (file)
@@ -107,11 +107,12 @@ OptionsProc(HWND hwndDlg,
 
         case WM_NOTIFY:
         {
-            LPNMUPDOWN  lpnmud =  (LPNMUPDOWN)lParam;
-            LPPSHNOTIFY lppsn  = (LPPSHNOTIFY)lParam;
+            LPPSHNOTIFY lppsn = (LPPSHNOTIFY)lParam;
 
             if (lppsn->hdr.code == UDN_DELTAPOS)
             {
+                LPNMUPDOWN lpnmud = (LPNMUPDOWN)lParam;
+
                 if (lppsn->hdr.idFrom == IDC_UPDOWN_BUFFER_SIZE)
                 {
                     lpnmud->iPos = min(max(lpnmud->iPos + lpnmud->iDelta, 1), 999);