3 * Copyright (C) 2004 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * PROJECT: ReactOS Software Control Panel
22 * FILE: dll/cpl/appwiz/appwiz.c
23 * PURPOSE: ReactOS Software Control Panel
24 * PROGRAMMERS: Gero Kuehn (reactos.filter@gkware.com)
25 * Dmitry Chapyshev (lentind@yandex.ru)
33 #define NUM_APPLETS (1)
35 LONG CALLBACK
SystemApplet(VOID
);
36 INT_PTR CALLBACK
GeneralPageProc(HWND hwndDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
37 INT_PTR CALLBACK
ComputerPageProc(HWND hwndDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
38 HINSTANCE hApplet
= 0;
42 APPLET Applets
[NUM_APPLETS
] =
44 {IDI_CPLSYSTEM
, IDS_CPLSYSTEMNAME
, IDS_CPLSYSTEMDESCRIPTION
, SystemApplet
}
48 InitPropSheetPage(PROPSHEETPAGE
*psp
, WORD idDlg
, DLGPROC DlgProc
)
50 ZeroMemory(psp
, sizeof(PROPSHEETPAGE
));
51 psp
->dwSize
= sizeof(PROPSHEETPAGE
);
52 psp
->dwFlags
= PSP_DEFAULT
;
53 psp
->hInstance
= hApplet
;
54 psp
->pszTemplate
= MAKEINTRESOURCE(idDlg
);
55 psp
->pfnDlgProc
= DlgProc
;
67 LoadString(hApplet
, IDS_CPLSYSTEMNAME
, Caption
, sizeof(Caption
) / sizeof(TCHAR
));
69 ZeroMemory(&psh
, sizeof(PROPSHEETHEADER
));
70 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
71 psh
.dwFlags
= PSH_PROPSHEETPAGE
;
72 psh
.hwndParent
= NULL
;
73 psh
.hInstance
= hApplet
;
74 psh
.hIcon
= LoadIcon(hApplet
, MAKEINTRESOURCE(IDI_CPLSYSTEM
));
75 psh
.pszCaption
= Caption
;
76 psh
.nPages
= sizeof(psp
) / sizeof(PROPSHEETPAGE
);
79 psh
.pfnCallback
= NULL
;
81 InitPropSheetPage(&psp
[0], IDD_PROPPAGEINSTALL
, (DLGPROC
) RemovePageProc
);
82 InitPropSheetPage(&psp
[1], IDD_PROPPAGEUPDATES
, (DLGPROC
) UpdatesPageProc
);
83 InitPropSheetPage(&psp
[2], IDD_PROPPAGEADD
, (DLGPROC
) AddPageProc
);
84 InitPropSheetPage(&psp
[3], IDD_PROPPAGEROSSETUP
, (DLGPROC
) RosPageProc
);
86 return (LONG
)(PropertySheet(&psh
) != -1);
90 /* Control Panel Callback */
92 CPlApplet(HWND hwndCPl
, UINT uMsg
, LPARAM lParam1
, LPARAM lParam2
)
97 UNREFERENCED_PARAMETER(hwndCPl
);
109 CPlInfo
= (CPLINFO
*)lParam2
;
111 CPlInfo
->idIcon
= Applets
[i
].idIcon
;
112 CPlInfo
->idName
= Applets
[i
].idName
;
113 CPlInfo
->idInfo
= Applets
[i
].idDescription
;
117 Applets
[i
].AppletProc();
126 DllMain(HINSTANCE hinstDLL
, DWORD dwReason
, LPVOID lpvReserved
)
128 UNREFERENCED_PARAMETER(lpvReserved
);
132 case DLL_PROCESS_ATTACH
:
133 case DLL_THREAD_ATTACH
: