[DESK.CPL]
authorEric Kohl <eric.kohl@reactos.org>
Fri, 10 Sep 2010 21:57:36 +0000 (21:57 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 10 Sep 2010 21:57:36 +0000 (21:57 +0000)
Fix client font in the advanced appearance dialog. Patch by Katayama Hirofumi.
See issue #5552 for more details.

svn path=/trunk/; revision=48742

reactos/dll/cpl/desk/preview.c

index 1c35101..c4a8d16 100644 (file)
@@ -63,6 +63,7 @@ typedef struct _PREVIEW_DATA
     HFONT hCaptionFont;
     HFONT hMenuFont;
     HFONT hMessageFont;
+    HFONT hClientFont;
 
     HMENU hMenu;
 
@@ -112,6 +113,8 @@ OnCreate(HWND hwnd, PPREVIEW_DATA pPreviewData)
 {
     THEME *theme;
 
+    pPreviewData->hClientFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
+
     /* Load and modify the menu */
     pPreviewData->hMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDR_PREVIEW_MENU));
     EnableMenuItem(pPreviewData->hMenu,
@@ -289,7 +292,7 @@ OnPaint(HWND hwnd, PPREVIEW_DATA pPreviewData)
     rc.left += 4;
     rc.top += 2;
     SetTextColor(hdc, theme->crColor[COLOR_WINDOWTEXT]);
-    hOldFont = SelectObject(hdc, pPreviewData->hCaptionFont);   /* FIXME: client text is not caption text */
+    hOldFont = SelectObject(hdc, pPreviewData->hClientFont);
     DrawText(hdc, pPreviewData->lpWinTxt, -1, &rc, DT_LEFT);
     SelectObject(hdc, hOldFont);