/*
- * ReactOS
- * Copyright (C) 2004 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id$
- *
- * PROJECT: ReactOS Software Control Panel
- * FILE: dll/cpl/appwiz/appwiz.c
- * PURPOSE: ReactOS Software Control Panel
- * PROGRAMMERS: Gero Kuehn (reactos.filter@gkware.com)
- * Dmitry Chapyshev (lentind@yandex.ru)
- * UPDATE HISTORY:
- * 06-17-2004 Created
- * 09-25-2007 Modify
+ * PROJECT: ReactOS Software Control Panel
+ * FILE: dll/cpl/appwiz/appwiz.c
+ * PURPOSE: ReactOS Software Control Panel
+ * PROGRAMMERS: Gero Kuehn (reactos.filter@gkware.com)
+ * Dmitry Chapyshev (dmitry@reactos.org)
*/
#include "appwiz.h"
-#define NUM_APPLETS (1)
-
-LONG CALLBACK SystemApplet(VOID);
-INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK ComputerPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-HINSTANCE hApplet = 0;
-HWND hCPLWindow;
-
-/* Applets */
-
-APPLET Applets[NUM_APPLETS] =
-{
- {IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, SystemApplet}
-};
-
-static VOID
-InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
-{
- ZeroMemory(psp, sizeof(PROPSHEETPAGE));
- psp->dwSize = sizeof(PROPSHEETPAGE);
- psp->dwFlags = PSP_DEFAULT;
- psp->hInstance = hApplet;
- psp->pszTemplate = MAKEINTRESOURCE(idDlg);
- psp->pfnDlgProc = DlgProc;
-}
-
-
-/* First Applet */
-LONG CALLBACK
-SystemApplet(VOID)
-{
- PROPSHEETPAGE psp[4];
- PROPSHEETHEADER psh;
- TCHAR Caption[1024];
-
- LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
-
- ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
- psh.dwSize = sizeof(PROPSHEETHEADER);
- psh.dwFlags = PSH_PROPSHEETPAGE;
- psh.hwndParent = hCPLWindow;
- psh.hInstance = hApplet;
- psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
- psh.pszCaption = Caption;
- psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
- psh.nStartPage = 0;
- psh.ppsp = psp;
- psh.pfnCallback = NULL;
-
- InitPropSheetPage(&psp[0], IDD_PROPPAGEINSTALL, (DLGPROC) RemovePageProc);
- InitPropSheetPage(&psp[1], IDD_PROPPAGEUPDATES, (DLGPROC) UpdatesPageProc);
- InitPropSheetPage(&psp[2], IDD_PROPPAGEADD, (DLGPROC) AddPageProc);
- InitPropSheetPage(&psp[3], IDD_PROPPAGEROSSETUP, (DLGPROC) RosPageProc);
-
- return (LONG)(PropertySheet(&psh) != -1);
-}
-
+HINSTANCE hApplet = NULL;
/* Control Panel Callback */
LONG CALLBACK
CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{
CPLINFO *CPlInfo;
- DWORD i;
- i = (DWORD)lParam1;
switch (uMsg)
{
case CPL_INIT:
return TRUE;
case CPL_GETCOUNT:
- return NUM_APPLETS;
+ return 1;
case CPL_INQUIRE:
CPlInfo = (CPLINFO*)lParam2;
CPlInfo->lData = 0;
- CPlInfo->idIcon = Applets[i].idIcon;
- CPlInfo->idName = Applets[i].idName;
- CPlInfo->idInfo = Applets[i].idDescription;
+ CPlInfo->idIcon = IDI_CPLSYSTEM;
+ CPlInfo->idName = IDS_CPLSYSTEMNAME;
+ CPlInfo->idInfo = IDS_CPLSYSTEMDESCRIPTION;
break;
case CPL_DBLCLK:
- hCPLWindow = hwndCPl;
- Applets[i].AppletProc();
+ ShellExecute(NULL,
+ NULL,
+ _T("rapps.exe"),
+ NULL,
+ NULL,
+ 1);
break;
}
return FALSE;
}
-
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{