Author: gadamopoulos
Date: Mon Apr 22 13:02:48 2013
New Revision: 58828
URL:
http://svn.reactos.org/svn/reactos?rev=58828&view=rev
Log:
[desk.cpl]
- Draw the classic theme preview if drawing the visual styles preview failed
Modified:
trunk/reactos/dll/cpl/desk/appearance.c
Modified: trunk/reactos/dll/cpl/desk/appearance.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/appearance.c?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/appearance.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/appearance.c [iso-8859-1] Mon Apr 22 13:02:48 2013
@@ -15,19 +15,20 @@
static void
AppearancePage_UpdateThemePreview(HWND hwndDlg, GLOBALS *g)
{
- if (g->ActiveTheme.ThemeActive == FALSE)
- {
- SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0,
(LPARAM)&g->Scheme);
- SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SET_HDC_PREVIEW, 0, 0);
- }
- else
+ if (g->ActiveTheme.ThemeActive)
{
RECT rcWindow;
+
GetClientRect(GetDlgItem(hwndDlg, IDC_APPEARANCE_PREVIEW), &rcWindow);
- DrawThemePreview(g->hdcThemePreview, &g->Scheme,
&g->ActiveTheme, &rcWindow);
-
- SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SET_HDC_PREVIEW, 0,
(LPARAM)g->hdcThemePreview);
- }
+ if (DrawThemePreview(g->hdcThemePreview, &g->Scheme,
&g->ActiveTheme, &rcWindow))
+ {
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SET_HDC_PREVIEW, 0,
(LPARAM)g->hdcThemePreview);
+ return;
+ }
+ }
+
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0,
(LPARAM)&g->Scheme);
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SET_HDC_PREVIEW, 0, 0);
}
static void