Author: tkreuzer
Date: Mon May 28 02:34:20 2007
New Revision: 26928
URL:
http://svn.reactos.org/svn/reactos?rev=26928&view=rev
Log:
- remove unused DrawPreview function
- small code reformat
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 (original)
+++ trunk/reactos/dll/cpl/desk/appearance.c Mon May 28 02:34:20 2007
@@ -309,17 +309,8 @@
}
-/* Draw the preview window, unimplemented */
-#if 0
-static VOID
-DrawPreview(HWND hwndPreview, THEME* pTheme)
-{
-}
-#endif
-
-
-static VOID
-AppearancePage_Init(HWND hwndDlg, GLOBALS *g)
+static INT_PTR
+AppearancePage_OnInit(HWND hwndDlg, GLOBALS *g)
{
HKEY hkNewSchemes, hkScheme, hkSizes, hkSize;
FILETIME ftLastWriteTime;
@@ -328,6 +319,14 @@
DWORD dwDisposition = 0;
INT iStyle, iSize, iTemplateIndex, iListIndex = 0;
INT Result;
+
+ g = (GLOBALS*)malloc(sizeof(GLOBALS));
+ if (g == NULL)
+ {
+ return FALSE;
+ }
+
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)g);
LoadCurrentTheme(g);
@@ -395,12 +394,16 @@
RegCloseKey(hkNewSchemes);
}
SendMessage(GetDlgItem(hwndDlg, IDC_APPEARANCE_COLORSCHEME), LB_SETCURSEL, 0, 0);
-}
-
-
-static VOID
-AppearancePage_CleanUp(HWND hwndDlg, GLOBALS *g)
-{
+
+ return FALSE;
+}
+
+
+static INT_PTR
+AppearancePage_OnDestroy(HWND hwndDlg, GLOBALS *g)
+{
+ free(g);
+ return TRUE;
}
@@ -416,18 +419,10 @@
switch (uMsg)
{
case WM_INITDIALOG:
- g = (GLOBALS*)malloc(sizeof(GLOBALS));
- if (g == NULL)
- return FALSE;
-
- SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)g);
- AppearancePage_Init(hwndDlg, g);
- break;
+ return AppearancePage_OnInit(hwndDlg, g);
case WM_DESTROY:
- AppearancePage_CleanUp(hwndDlg, g);
- free(g);
- break;
+ return AppearancePage_OnDestroy(hwndDlg, g);
case WM_COMMAND:
switch (LOWORD(wParam))