2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS User Manager Control Panel
4 * FILE: dll/cpl/usrmgr/usrmgr.c
5 * PURPOSE: Main functions
7 * PROGRAMMERS: Eric Kohl
14 static LONG APIENTRY
UsrmgrApplet(HWND hwnd
, UINT uMsg
, LPARAM wParam
, LPARAM lParam
);
16 HINSTANCE hApplet
= 0;
19 APPLET Applets
[NUM_APPLETS
] =
31 InitPropSheetPage(PROPSHEETPAGE
*psp
, WORD idDlg
, DLGPROC DlgProc
)
33 ZeroMemory(psp
, sizeof(PROPSHEETPAGE
));
34 psp
->dwSize
= sizeof(PROPSHEETPAGE
);
35 psp
->dwFlags
= PSP_DEFAULT
;
36 psp
->hInstance
= hApplet
;
37 psp
->pszTemplate
= MAKEINTRESOURCE(idDlg
);
38 psp
->pfnDlgProc
= DlgProc
;
44 UsrmgrApplet(HWND hwnd
, UINT uMsg
, LPARAM wParam
, LPARAM lParam
)
50 UNREFERENCED_PARAMETER(lParam
);
51 UNREFERENCED_PARAMETER(wParam
);
52 UNREFERENCED_PARAMETER(uMsg
);
54 LoadString(hApplet
, IDS_CPLNAME
, Caption
, sizeof(Caption
) / sizeof(TCHAR
));
56 ZeroMemory(&psh
, sizeof(PROPSHEETHEADER
));
57 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
58 psh
.dwFlags
= PSH_PROPSHEETPAGE
;
59 psh
.hwndParent
= hwnd
;
60 psh
.hInstance
= hApplet
;
61 psh
.hIcon
= LoadIcon(hApplet
, MAKEINTRESOURCE(IDI_USRMGR_ICON
));
62 psh
.pszCaption
= Caption
;
63 psh
.nPages
= sizeof(psp
) / sizeof(PROPSHEETPAGE
);
67 InitPropSheetPage(&psp
[0], IDD_USERS
, UsersPageProc
);
68 InitPropSheetPage(&psp
[1], IDD_GROUPS
, GroupsPageProc
);
69 InitPropSheetPage(&psp
[2], IDD_EXTRA
, ExtraPageProc
);
71 return (LONG
)(PropertySheet(&psh
) != -1);
75 /* Control Panel Callback */
77 CPlApplet(HWND hwndCPl
, UINT uMsg
, LPARAM lParam1
, LPARAM lParam2
)
91 CPLINFO
*CPlInfo
= (CPLINFO
*)lParam2
;
93 CPlInfo
->idIcon
= Applets
[i
].idIcon
;
94 CPlInfo
->idName
= Applets
[i
].idName
;
95 CPlInfo
->idInfo
= Applets
[i
].idDescription
;
100 Applets
[i
].AppletProc(hwndCPl
, uMsg
, lParam1
, lParam2
);
109 DllMain(HINSTANCE hinstDLL
, DWORD dwReason
, LPVOID lpvReserved
)
111 UNREFERENCED_PARAMETER(lpvReserved
);
115 case DLL_PROCESS_ATTACH
: