ReactOS 0.4.15-dev-5666-gc548b97
usrmgr.c File Reference
#include "usrmgr.h"
Include dependency graph for usrmgr.c:

Go to the source code of this file.

Macros

#define NUM_APPLETS   1
 

Functions

static LONG APIENTRY UsrmgrApplet (HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 
static VOID InitPropSheetPage (PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
 
static int CALLBACK PropSheetProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
 
LONG CALLBACK CPlApplet (HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
 

Variables

HINSTANCE hApplet = 0
 
APPLET Applets [NUM_APPLETS]
 

Macro Definition Documentation

◆ NUM_APPLETS

#define NUM_APPLETS   1

Definition at line 12 of file usrmgr.c.

Function Documentation

◆ CPlApplet()

LONG CALLBACK CPlApplet ( HWND  hwndCPl,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 91 of file usrmgr.c.

92{
93 UINT i = (UINT)lParam1;
94
95 switch (uMsg)
96 {
97 case CPL_INIT:
98 return TRUE;
99
100 case CPL_GETCOUNT:
101 return NUM_APPLETS;
102
103 case CPL_INQUIRE:
104 if (i < NUM_APPLETS)
105 {
106 CPLINFO *CPlInfo = (CPLINFO*)lParam2;
107 CPlInfo->lData = 0;
108 CPlInfo->idIcon = Applets[i].idIcon;
109 CPlInfo->idName = Applets[i].idName;
110 CPlInfo->idInfo = Applets[i].idDescription;
111 }
112 else
113 {
114 return TRUE;
115 }
116 break;
117
118 case CPL_DBLCLK:
119 if (i < NUM_APPLETS)
120 Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
121 else
122 return TRUE;
123 break;
124 }
125
126 return FALSE;
127}
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
int idDescription
Definition: hotplug.h:37
int idName
Definition: hotplug.h:36
int idIcon
Definition: hotplug.h:35
APPLET_PROC AppletProc
Definition: hotplug.h:38
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
#define NUM_APPLETS
Definition: usrmgr.c:12
APPLET Applets[NUM_APPLETS]
Definition: usrmgr.c:19

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  dwReason,
LPVOID  lpvReserved 
)

Definition at line 131 of file usrmgr.c.

132{
134
135 switch (dwReason)
136 {
138 hApplet = hinstDLL;
139 break;
140 }
141
142 return TRUE;
143}
DWORD dwReason
Definition: misc.cpp:154
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
static IN DWORD IN LPVOID lpvReserved
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
HINSTANCE hApplet
Definition: usrmgr.c:16

◆ InitPropSheetPage()

static VOID InitPropSheetPage ( PROPSHEETPAGE psp,
WORD  idDlg,
DLGPROC  DlgProc 
)
static

Definition at line 31 of file usrmgr.c.

32{
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;
39}
WORD idDlg
Definition: desk.c:110
DLGPROC DlgProc
Definition: desk.c:111
#define PSP_DEFAULT
Definition: prsht.h:22
#define PROPSHEETPAGE
Definition: prsht.h:389
#define ZeroMemory
Definition: winbase.h:1670
#define MAKEINTRESOURCE
Definition: winuser.h:591

Referenced by UsrmgrApplet().

◆ PropSheetProc()

static int CALLBACK PropSheetProc ( HWND  hwndDlg,
UINT  uMsg,
LPARAM  lParam 
)
static

Definition at line 42 of file usrmgr.c.

43{
44 // NOTE: This callback is needed to set large icon correctly.
46 switch (uMsg)
47 {
49 {
51 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
52 break;
53 }
54 }
55 return 0;
56}
#define IDI_USRMGR_ICON
Definition: resource.h:4
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define ICON_BIG
Definition: tnclass.cpp:51
LONG_PTR LPARAM
Definition: windef.h:208
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by UsrmgrApplet().

◆ UsrmgrApplet()

static LONG APIENTRY UsrmgrApplet ( HWND  hwnd,
UINT  uMsg,
LPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 60 of file usrmgr.c.

61{
62 PROPSHEETPAGE psp[2];
64
68
69 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
70 psh.dwSize = sizeof(PROPSHEETHEADER);
72 psh.hwndParent = hwnd;
73 psh.hInstance = hApplet;
74 psh.pszIcon = MAKEINTRESOURCEW(IDI_USRMGR_ICON);
75 psh.pszCaption = MAKEINTRESOURCEW(IDS_CPLNAME);
76 psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
77 psh.nStartPage = 0;
78 psh.ppsp = psp;
79 psh.pfnCallback = PropSheetProc;
80
83 /* InitPropSheetPage(&psp[2], IDD_EXTRA, ExtraPageProc); */
84
85 return (LONG)(PropertySheet(&psh) != -1);
86}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define IDS_CPLNAME
Definition: resource.h:8
#define IDD_USERS
Definition: resource.h:10
#define IDD_GROUPS
Definition: resource.h:11
INT_PTR CALLBACK GroupsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: groups.c:436
long LONG
Definition: pedump.c:60
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PropertySheet
Definition: prsht.h:400
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
#define PSH_USEICONID
Definition: prsht.h:42
INT_PTR CALLBACK UsersPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: users.c:689
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: usrmgr.c:42
static VOID InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
Definition: usrmgr.c:31
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Variable Documentation

◆ Applets

APPLET Applets[NUM_APPLETS]
Initial value:
=
{
{
}
}
#define IDS_CPLDESCRIPTION
Definition: resource.h:9
static LONG APIENTRY UsrmgrApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
Definition: usrmgr.c:60

Definition at line 19 of file usrmgr.c.

Referenced by CPlApplet().

◆ hApplet

HINSTANCE hApplet = 0

Definition at line 16 of file usrmgr.c.

Referenced by DllMain(), InitPropSheetPage(), PropSheetProc(), and UsrmgrApplet().