Author: ekohl
Date: Sun Feb 18 00:40:39 2007
New Revision: 25832
URL:
http://svn.reactos.org/svn/reactos?rev=25832&view=rev
Log:
Reenable the preview control notification. The user can now select the GUI item clicking
it in the preview control.
Modified:
trunk/reactos/dll/cpl/desk/advappdlg.c
trunk/reactos/dll/cpl/desk/appearance.h
trunk/reactos/dll/cpl/desk/preview.c
trunk/reactos/dll/cpl/desk/preview.h
Modified: trunk/reactos/dll/cpl/desk/advappdlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/advappdlg.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/desk/advappdlg.c (original)
+++ trunk/reactos/dll/cpl/desk/advappdlg.c Sun Feb 18 00:40:39 2007
@@ -409,6 +409,27 @@
}
+static VOID
+SelectComboByElement(HWND hwnd, INT id, LPARAM lParam)
+{
+ INT nCount;
+ INT i;
+
+ nCount = SendDlgItemMessage(hwnd, id, CB_GETCOUNT, 0, 0);
+ if (nCount == CB_ERR)
+ return;
+
+ for (i = 0; i < nCount; i++)
+ {
+ if (SendDlgItemMessage(hwnd, id, CB_GETITEMDATA, (WPARAM)i, 0) == lParam)
+ {
+ SendDlgItemMessage(hwnd, id, CB_SETCURSEL, (WPARAM)i, 0);
+ break;
+ }
+ }
+}
+
+
INT_PTR CALLBACK
AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@@ -440,6 +461,13 @@
case IDCANCEL:
g->ThemeAdv = g->Theme;
EndDialog(hwndDlg, 0);
+ break;
+
+ case IDC_APPEARANCE_PREVIEW:
+ SaveCurrentValues(hwndDlg, g);
+ SelectComboByElement(hwndDlg, IDC_ADVAPPEARANCE_ELEMENT, lParam);
+ g->CurrentElement = (INT)lParam;
+ UpdateControls(hwndDlg, g);
break;
case IDC_ADVAPPEARANCE_ELEMENT:
Modified: trunk/reactos/dll/cpl/desk/appearance.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/appearance.h?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/appearance.h (original)
+++ trunk/reactos/dll/cpl/desk/appearance.h Sun Feb 18 00:40:39 2007
@@ -67,9 +67,9 @@
THEME_PRESET ThemeTemplates[MAX_TEMPLATES];
THEME Theme;
THEME ThemeAdv;
- int ColorList[NUM_COLORS];
+ INT ColorList[NUM_COLORS];
HBITMAP hbmpColor[3];
- int CurrentElement;
+ INT CurrentElement;
COLORREF crCOLOR_BTNFACE;
COLORREF crCOLOR_BTNSHADOW;
COLORREF crCOLOR_BTNTEXT;
@@ -81,7 +81,7 @@
extern const ASSIGNMENT g_Assignment[NUM_ELEMENTS];
extern const TCHAR g_RegColorNames[NUM_COLORS][MAX_COLORNAMELENGTH];
-extern const int g_SizeMetric[NUM_SIZES];
+extern const INT g_SizeMetric[NUM_SIZES];
/* prototypes for appearance.c */
INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam);
Modified: trunk/reactos/dll/cpl/desk/preview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/preview.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/preview.c (original)
+++ trunk/reactos/dll/cpl/desk/preview.c Sun Feb 18 00:40:39 2007
@@ -441,7 +441,10 @@
if (PtInRect(&pPreviewData->rcDialogButton, pt))
type = IDX_3D_OBJECTS;
- SendMessage(GetParent(hwnd), WM_USER, 0, type);
+ SendMessage(GetParent(hwnd),
+ WM_COMMAND,
+ MAKEWPARAM(GetWindowLongPtrW(hwnd, GWLP_ID), 0),
+ (LPARAM)type);
}
Modified: trunk/reactos/dll/cpl/desk/preview.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/preview.h?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/preview.h (original)
+++ trunk/reactos/dll/cpl/desk/preview.h Sun Feb 18 00:40:39 2007
@@ -6,22 +6,21 @@
* COPYRIGHT: Copyright 2006, 2007 Eric Kohl
*/
-#define IDX_3D_OBJECTS 0
-#define IDX_SCROLLBAR 1
-#define IDX_DESKTOP 2
-#define IDX_DIALOG 3
-#define IDX_WINDOW 4
-#define IDX_APPSPACE 5
+#define IDX_DESKTOP 0
+#define IDX_INACTIVE_CAPTION 1
+#define IDX_INACTIVE_BORDER 2
+#define IDX_ACTIVE_CAPTION 3
+#define IDX_ACTIVE_BORDER 4
+#define IDX_MENU 5
#define IDX_SELECTION 6
-#define IDX_MENU 7
+#define IDX_WINDOW 7
+#define IDX_SCROLLBAR 8
+#define IDX_3D_OBJECTS 9
+#define IDX_CAPTION_BUTTON 12
+#define IDX_DIALOG 14
+#define IDX_APPSPACE 16
+#define IDX_QUICKINFO 20
-#define IDX_QUICKINFO 9
-#define IDX_INACTIVE_BORDER 10
-#define IDX_ACTIVE_BORDER 11
-
-#define IDX_INACTIVE_CAPTION 15
-#define IDX_ACTIVE_CAPTION 16
-#define IDX_CAPTION_BUTTON 17
#define PVM_GETCYCAPTION (WM_USER+1)