d9307282dea3d102d8acbbe91d73ddd6a4021caf
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 Sample Control Panel
22 * FILE: lib/cpl/main/main.c
23 * PURPOSE: ReactOS Main Control Panel
24 * PROGRAMMER: Eric Kohl
36 #define NUM_APPLETS (2)
39 HINSTANCE hApplet
= 0;
43 APPLET Applets
[NUM_APPLETS
] =
45 {IDC_CPLICON_1
, IDS_CPLNAME_1
, IDS_CPLDESCRIPTION_1
, MouseApplet
},
46 {IDC_CPLICON_2
, IDS_CPLNAME_2
, IDS_CPLDESCRIPTION_2
, KeyboardApplet
}
51 InitPropSheetPage(PROPSHEETPAGE
*psp
, WORD idDlg
, DLGPROC DlgProc
)
53 ZeroMemory(psp
, sizeof(PROPSHEETPAGE
));
54 psp
->dwSize
= sizeof(PROPSHEETPAGE
);
55 psp
->dwFlags
= PSP_DEFAULT
;
56 psp
->hInstance
= hApplet
;
57 psp
->pszTemplate
= MAKEINTRESOURCE(idDlg
);
58 psp
->pfnDlgProc
= DlgProc
;
62 /* Control Panel Callback */
64 CPlApplet(HWND hwndCpl
,
79 CPLINFO
*CPlInfo
= (CPLINFO
*)lParam2
;
80 UINT uAppIndex
= (UINT
)lParam1
;
83 CPlInfo
->idIcon
= Applets
[uAppIndex
].idIcon
;
84 CPlInfo
->idName
= Applets
[uAppIndex
].idName
;
85 CPlInfo
->idInfo
= Applets
[uAppIndex
].idDescription
;
91 UINT uAppIndex
= (UINT
)lParam1
;
92 Applets
[uAppIndex
].AppletProc(hwndCpl
, uMsg
, lParam1
, lParam2
);
102 DllMain(HINSTANCE hinstDLL
,
108 case DLL_PROCESS_ATTACH
:
109 case DLL_THREAD_ATTACH
: