3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS User Manager Control Panel
5 * FILE: dll/cpl/usrmgr/usrmgr.c
6 * PURPOSE: Main functions
8 * PROGRAMMERS: Eric Kohl
15 static LONG APIENTRY
UsrmgrApplet(HWND hwnd
, UINT uMsg
, LPARAM wParam
, LPARAM lParam
);
17 HINSTANCE hApplet
= 0;
20 APPLET Applets
[NUM_APPLETS
] =
32 InitPropSheetPage(PROPSHEETPAGE
*psp
, WORD idDlg
, DLGPROC DlgProc
)
34 ZeroMemory(psp
, sizeof(PROPSHEETPAGE
));
35 psp
->dwSize
= sizeof(PROPSHEETPAGE
);
36 psp
->dwFlags
= PSP_DEFAULT
;
37 psp
->hInstance
= hApplet
;
38 psp
->pszTemplate
= MAKEINTRESOURCE(idDlg
);
39 psp
->pfnDlgProc
= DlgProc
;
45 UsrmgrApplet(HWND hwnd
, UINT uMsg
, LPARAM wParam
, LPARAM lParam
)
51 UNREFERENCED_PARAMETER(lParam
);
52 UNREFERENCED_PARAMETER(wParam
);
53 UNREFERENCED_PARAMETER(uMsg
);
55 LoadString(hApplet
, IDS_CPLNAME
, Caption
, sizeof(Caption
) / sizeof(TCHAR
));
57 ZeroMemory(&psh
, sizeof(PROPSHEETHEADER
));
58 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
59 psh
.dwFlags
= PSH_PROPSHEETPAGE
;
60 psh
.hwndParent
= hwnd
;
61 psh
.hInstance
= hApplet
;
62 psh
.hIcon
= LoadIcon(hApplet
, MAKEINTRESOURCE(IDI_USRMGR_ICON
));
63 psh
.pszCaption
= Caption
;
64 psh
.nPages
= sizeof(psp
) / sizeof(PROPSHEETPAGE
);
68 InitPropSheetPage(&psp
[0], IDD_USERS
, (DLGPROC
)UsersPageProc
);
69 InitPropSheetPage(&psp
[1], IDD_GROUPS
, (DLGPROC
)GroupsPageProc
);
70 InitPropSheetPage(&psp
[2], IDD_EXTRA
, (DLGPROC
)ExtraPageProc
);
72 return (LONG
)(PropertySheet(&psh
) != -1);
76 /* Control Panel Callback */
78 CPlApplet(HWND hwndCPl
, UINT uMsg
, LPARAM lParam1
, LPARAM lParam2
)
92 CPLINFO
*CPlInfo
= (CPLINFO
*)lParam2
;
94 CPlInfo
->idIcon
= Applets
[i
].idIcon
;
95 CPlInfo
->idName
= Applets
[i
].idName
;
96 CPlInfo
->idInfo
= Applets
[i
].idDescription
;
101 Applets
[i
].AppletProc(hwndCPl
, uMsg
, lParam1
, lParam2
);
110 DllMain(HINSTANCE hinstDLL
, DWORD dwReason
, LPVOID lpvReserved
)
112 UNREFERENCED_PARAMETER(lpvReserved
);
116 case DLL_PROCESS_ATTACH
: