- Update to r53061
[reactos.git] / dll / cpl / desk / preview.c
index 1c35101..09513bb 100644 (file)
@@ -7,9 +7,6 @@
  */
 
 #include "desk.h"
-#include "theme.h"
-#include "preview.h"
-#include "draw.h"
 
 static const TCHAR szPreviewWndClass[] = TEXT("PreviewWndClass");
 
@@ -63,6 +60,7 @@ typedef struct _PREVIEW_DATA
     HFONT hCaptionFont;
     HFONT hMenuFont;
     HFONT hMessageFont;
+    HFONT hClientFont;
 
     HMENU hMenu;
 
@@ -76,6 +74,7 @@ static VOID UpdatePreviewTheme(HWND hwnd, PPREVIEW_DATA pPreviewData, THEME *the
     pPreviewData->hbrScrollbar = CreateSolidBrush(theme->crColor[COLOR_SCROLLBAR]);
     if (pPreviewData->hbrDesktop != NULL)
         DeleteObject(pPreviewData->hbrDesktop);
+
     pPreviewData->hbrDesktop = CreateSolidBrush(theme->crColor[COLOR_DESKTOP]);
     if (pPreviewData->hbrWindow != NULL)
         DeleteObject(pPreviewData->hbrWindow);
@@ -112,6 +111,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 +290,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);