[DESK.CPL]

Fix client font in the advanced appearance dialog. Patch by Katayama Hirofumi.
See issue #5552 for more details.

svn path=/trunk/; revision=48742
This commit is contained in:
Eric Kohl 2010-09-10 21:57:36 +00:00
parent 9488b4aab6
commit c3c0a62855

View file

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