ReactOS  0.4.14-dev-50-g13bb5e2
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 94 of file usrmgr.c.

95 {
96  int i = (int)lParam1;
97 
98  switch (uMsg)
99  {
100  case CPL_INIT:
101  return TRUE;
102 
103  case CPL_GETCOUNT:
104  return NUM_APPLETS;
105 
106  case CPL_INQUIRE:
107  {
108  CPLINFO *CPlInfo = (CPLINFO*)lParam2;
109  CPlInfo->lData = 0;
110  CPlInfo->idIcon = Applets[i].idIcon;
111  CPlInfo->idName = Applets[i].idName;
112  CPlInfo->idInfo = Applets[i].idDescription;
113  }
114  break;
115 
116  case CPL_DBLCLK:
117  Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
118  break;
119  }
120 
121  return FALSE;
122 }
#define TRUE
Definition: types.h:120
Definition: cpl.h:24
int idName
Definition: hotplug.h:27
int idIcon
Definition: hotplug.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
int idDescription
Definition: hotplug.h:28
#define CPL_DBLCLK
Definition: cpl.h:16
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
#define NUM_APPLETS
Definition: usrmgr.c:12
APPLET_PROC AppletProc
Definition: hotplug.h:29
#define CPL_INIT
Definition: cpl.h:12
#define CPL_INQUIRE
Definition: cpl.h:14
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
APPLET Applets[NUM_APPLETS]
Definition: usrmgr.c:19
#define CPL_GETCOUNT
Definition: cpl.h:13
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ DllMain()

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

Definition at line 126 of file usrmgr.c.

127 {
129 
130  switch (dwReason)
131  {
132  case DLL_PROCESS_ATTACH:
133  hApplet = hinstDLL;
134  break;
135  }
136 
137  return TRUE;
138 }
HINSTANCE hApplet
Definition: usrmgr.c:16
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
static IN DWORD IN LPVOID lpvReserved
DWORD dwReason
Definition: misc.cpp:154

◆ 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 }
HINSTANCE hApplet
Definition: usrmgr.c:16
WORD idDlg
Definition: desk.c:109
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define ZeroMemory
Definition: winbase.h:1635
#define PSP_DEFAULT
Definition: prsht.h:22
DLGPROC DlgProc
Definition: desk.c:110
#define PROPSHEETPAGE
Definition: prsht.h:371

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.
45  HICON hIcon;
46  switch (uMsg)
47  {
48  case PSCB_INITIALIZED:
49  {
51  SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
52  break;
53  }
54  }
55  return 0;
56 }
HINSTANCE hApplet
Definition: usrmgr.c:16
static HICON
Definition: imagelist.c:84
#define IDI_USRMGR_ICON
Definition: resource.h:4
LONG_PTR LPARAM
Definition: windef.h:208
#define PSCB_INITIALIZED
Definition: prsht.h:75
HICON hIcon
Definition: msconfig.c:44
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define ICON_BIG
Definition: tnclass.cpp:51

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];
63  PROPSHEETHEADER psh;
64  TCHAR Caption[1024];
65 
69 
70  LoadString(hApplet, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
71 
72  ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
73  psh.dwSize = sizeof(PROPSHEETHEADER);
75  psh.hwndParent = hwnd;
76  psh.hInstance = hApplet;
77  psh.pszIcon = MAKEINTRESOURCEW(IDI_USRMGR_ICON);
78  psh.pszCaption = Caption;
79  psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
80  psh.nStartPage = 0;
81  psh.ppsp = psp;
82  psh.pfnCallback = PropSheetProc;
83 
86  /* InitPropSheetPage(&psp[2], IDD_EXTRA, ExtraPageProc); */
87 
88  return (LONG)(PropertySheet(&psh) != -1);
89 }
HINSTANCE hApplet
Definition: usrmgr.c:16
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define IDD_USERS
Definition: resource.h:10
#define ZeroMemory
Definition: winbase.h:1635
INT_PTR CALLBACK UsersPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: users.c:689
#define PSH_USECALLBACK
Definition: prsht.h:48
#define IDI_USRMGR_ICON
Definition: resource.h:4
WPARAM wParam
Definition: combotst.c:138
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: usrmgr.c:42
#define IDS_CPLNAME
Definition: resource.h:8
#define PSH_USEICONID
Definition: prsht.h:42
long LONG
Definition: pedump.c:60
INT_PTR CALLBACK GroupsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: groups.c:436
#define PROPSHEETHEADER
Definition: prsht.h:374
char TCHAR
Definition: xmlstorage.h:189
#define IDD_GROUPS
Definition: resource.h:11
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
static VOID InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
Definition: usrmgr.c:31
#define PropertySheet
Definition: prsht.h:382
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
LPARAM lParam
Definition: combotst.c:139
#define LoadString
Definition: winuser.h:5720
#define PROPSHEETPAGE
Definition: prsht.h:371

Variable Documentation

◆ Applets

APPLET Applets[NUM_APPLETS]
Initial value:
=
{
{
}
}
#define IDI_USRMGR_ICON
Definition: resource.h:4
#define IDS_CPLNAME
Definition: resource.h:8
#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().