[CONSOLE.CPL][CONSRV]
[reactos.git] / win32ss / user / winsrv / consrv / frontends / gui / conwnd.c
index c92593d..2a7ff36 100644 (file)
@@ -506,8 +506,8 @@ OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create)
 
     GuiData->hWindow = hWnd;
 
-    GuiData->Font = CreateFontW(LOWORD(GuiData->GuiInfo.FontSize),
-                                0, // HIWORD(GuiData->GuiInfo.FontSize),
+    GuiData->Font = CreateFontW(GuiData->GuiInfo.FontSize.Y,
+                                0, // GuiData->GuiInfo.FontSize.X,
                                 0,
                                 TA_BASELINE,
                                 GuiData->GuiInfo.FontWeight,
@@ -945,12 +945,10 @@ GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
 static VOID
 OnPaint(PGUI_CONSOLE_DATA GuiData)
 {
-    PCONSOLE_SCREEN_BUFFER ActiveBuffer;
+    PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer;
     PAINTSTRUCT ps;
     RECT rcPaint;
 
-    ActiveBuffer = GuiData->ActiveBuffer;
-
     BeginPaint(GuiData->hWindow, &ps);
     if (ps.hdc != NULL &&
         ps.rcPaint.left < ps.rcPaint.right &&
@@ -2323,6 +2321,19 @@ ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
             break;
         }
 
+        /*
+         * Undocumented message sent by Windows' console.dll for applying console info.
+         * See http://www.catch22.net/sites/default/source/files/setconsoleinfo.c
+         * and http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf
+         * for more information.
+         */
+        case WM_SETCONSOLEINFO:
+        {
+            DPRINT1("WM_SETCONSOLEINFO message\n");
+            GuiApplyWindowsConsoleSettings(GuiData, (HANDLE)wParam);
+            break;
+        }
+
         case PM_CONSOLE_BEEP:
             DPRINT1("Beep !!\n");
             Beep(800, 200);