ReactOS  0.4.14-dev-315-gbb6fece
main.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <wingdi.h>
#include <wincon.h>
#include <devguid.h>
#include <shlobj.h>
#include <cpl.h>
#include <regstr.h>
#include "resource.h"
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _APPLET
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define MAX_CPL_PAGES   32
 

Typedefs

typedef enum HWPAGE_DISPLAYMODEPHWPAGE_DISPLAYMODE
 
typedef struct _APPLET APPLET
 
typedef struct _APPLETPAPPLET
 

Enumerations

enum  HWPAGE_DISPLAYMODE {
  HWPD_STANDARDLIST = 0, HWPD_LARGELIST, HWPD_MAX = HWPD_LARGELIST, HWPD_STANDARDLIST = 0,
  HWPD_LARGELIST, HWPD_MAX = HWPD_LARGELIST, HWPD_STANDARDLIST = 0, HWPD_LARGELIST,
  HWPD_MAX = HWPD_LARGELIST, HWPD_STANDARDLIST = 0, HWPD_LARGELIST, HWPD_MAX = HWPD_LARGELIST
}
 

Functions

HWND WINAPI DeviceCreateHardwarePageEx (HWND hWndParent, LPGUID lpGuids, UINT uNumberOfGuids, HWPAGE_DISPLAYMODE DisplayMode)
 
LONG APIENTRY KeyboardApplet (HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 
BOOL InitPropSheetPage (PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC DlgProc)
 
BOOL CALLBACK PropSheetAddPage (HPROPSHEETPAGE hpage, LPARAM lParam)
 
LONG APIENTRY MouseApplet (HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 

Variables

HINSTANCE hApplet
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 7 of file main.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 8 of file main.h.

◆ MAX_CPL_PAGES

#define MAX_CPL_PAGES   32

Definition at line 47 of file main.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 6 of file main.h.

Typedef Documentation

◆ APPLET

◆ PAPPLET

typedef struct _APPLET * PAPPLET

◆ PHWPAGE_DISPLAYMODE

Enumeration Type Documentation

◆ HWPAGE_DISPLAYMODE

Enumerator
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 

Definition at line 22 of file main.h.

23 {
enum HWPAGE_DISPLAYMODE * PHWPAGE_DISPLAYMODE
HWPAGE_DISPLAYMODE
Definition: main.h:22
Definition: main.h:26

Function Documentation

◆ DeviceCreateHardwarePageEx()

HWND WINAPI DeviceCreateHardwarePageEx ( HWND  hWndParent,
LPGUID  lpGuids,
UINT  uNumberOfGuids,
HWPAGE_DISPLAYMODE  DisplayMode 
)

◆ InitPropSheetPage()

BOOL InitPropSheetPage ( PROPSHEETHEADER ppsh,
WORD  idDlg,
DLGPROC  DlgProc 
)

Definition at line 45 of file main.c.

46 {
47  HPROPSHEETPAGE hPage;
48  PROPSHEETPAGE psp;
49 
50  if (ppsh->nPages < MAX_CPL_PAGES)
51  {
52  ZeroMemory(&psp, sizeof(psp));
53  psp.dwSize = sizeof(psp);
54  psp.dwFlags = PSP_DEFAULT;
55  psp.hInstance = hApplet;
56  psp.pszTemplate = MAKEINTRESOURCE(idDlg);
57  psp.pfnDlgProc = DlgProc;
58 
59  hPage = CreatePropertySheetPage(&psp);
60  if (hPage != NULL)
61  {
62  return PropSheetAddPage(hPage, (LPARAM)ppsh);
63  }
64  }
65 
66  return FALSE;
67 }
WORD idDlg
Definition: desk.c:109
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define ZeroMemory
Definition: winbase.h:1642
#define MAX_CPL_PAGES
Definition: main.h:47
HINSTANCE hApplet
Definition: main.c:33
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CreatePropertySheetPage
Definition: prsht.h:381
#define PSP_DEFAULT
Definition: prsht.h:22
BOOL CALLBACK PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: main.c:70
BOOL CALLBACK DlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: main.c:93
#define PROPSHEETPAGE
Definition: prsht.h:371

◆ KeyboardApplet()

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

Definition at line 303 of file keyboard.c.

304 {
306  PROPSHEETHEADER psh;
307  HPSXA hpsxa;
308  TCHAR szCaption[256];
309  LONG ret;
310 
315 
316  LoadString(hApplet, IDS_CPLNAME_2, szCaption, sizeof(szCaption) / sizeof(TCHAR));
317 
318  ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
319  psh.dwSize = sizeof(PROPSHEETHEADER);
320  psh.dwFlags = PSH_PROPTITLE | PSH_USEICONID | PSH_USECALLBACK;
321  psh.hwndParent = hwnd;
322  psh.hInstance = hApplet;
323  psh.pszIcon = MAKEINTRESOURCE(IDC_CPLICON_2);
324  psh.pszCaption = szCaption;
325  psh.nStartPage = 0;
326  psh.phpage = hpsp;
327  psh.pfnCallback = PropSheetProc;
328 
329  /* Load additional pages provided by shell extensions */
331 
332  /* NOTE: The speed page (CPLPAGE_KEYBOARD_SPEED) cannot be replaced by
333  shell extensions since Win2k! */
336 
337  if (hpsxa != NULL)
339 
340  ret = (LONG)(PropertySheet(&psh) != -1);
341 
342  if (hpsxa != NULL)
344 
345  return ret;
346 }
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:1755
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
UINT WINAPI SHAddFromPropSheetExtArray(HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
Definition: shellord.c:1577
#define REGSTR_PATH_CONTROLSFOLDER
Definition: regstr.h:76
#define ZeroMemory
Definition: winbase.h:1642
HINSTANCE hApplet
Definition: access.c:17
#define PSH_USECALLBACK
Definition: prsht.h:48
WPARAM wParam
Definition: combotst.c:138
#define MAX_CPL_PAGES
Definition: main.h:47
#define PSH_USEICONID
Definition: prsht.h:42
long LONG
Definition: pedump.c:60
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
static INT_PTR CALLBACK KeyboardSpeedProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: keyboard.c:44
smooth NULL
Definition: ftsmooth.c:416
#define PROPSHEETHEADER
Definition: prsht.h:374
LONG_PTR LPARAM
Definition: windef.h:208
#define IDS_CPLNAME_2
Definition: resource.h:36
#define IDD_KEYBSPEED
Definition: resource.h:29
char TCHAR
Definition: xmlstorage.h:189
#define PSH_PROPTITLE
Definition: prsht.h:40
#define IDD_HARDWARE
Definition: resource.h:28
#define IDC_CPLICON_2
Definition: resource.h:6
int ret
static VOID InitPropSheetPage(PROPSHEETPAGE *psp, PSERVICEPROPSHEET dlgInfo, WORD idDlg, DLGPROC DlgProc)
Definition: propsheet.c:15
static BOOL CALLBACK PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: advmon.c:13
#define TEXT(s)
Definition: k32.h:26
#define PropertySheet
Definition: prsht.h:382
HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface)
Definition: shellord.c:1607
LPARAM lParam
Definition: combotst.c:139
#define LoadString
Definition: winuser.h:5720
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: keyboard.c:286
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
static INT_PTR CALLBACK KeybHardwareProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: keyboard.c:260

◆ MouseApplet()

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

Definition at line 1829 of file mouse.c.

1830 {
1832  PROPSHEETHEADER psh;
1833  HPSXA hpsxa;
1834  TCHAR Caption[256];
1835  UINT i;
1836  LONG ret;
1837 
1838  UNREFERENCED_PARAMETER(lParam1);
1839  UNREFERENCED_PARAMETER(lParam2);
1840  UNREFERENCED_PARAMETER(uMsg);
1842 
1843  LoadString(hApplet, IDS_CPLNAME_1, Caption, sizeof(Caption) / sizeof(TCHAR));
1844 
1845  ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
1846  psh.dwSize = sizeof(PROPSHEETHEADER);
1847  psh.dwFlags = PSH_PROPTITLE | PSH_USEICONID | PSH_USECALLBACK;
1848  psh.hwndParent = hwnd;
1849  psh.hInstance = hApplet;
1850  psh.pszIcon = MAKEINTRESOURCEW(IDC_CPLICON_1);
1851  psh.pszCaption = Caption;
1852  psh.nStartPage = 0;
1853  psh.phpage = hpsp;
1854  psh.pfnCallback = PropSheetProc;
1855 
1856  /* Load additional pages provided by shell extensions */
1858 
1859  for (i = 0; i != sizeof(PropPages) / sizeof(PropPages[0]); i++)
1860  {
1861  /* Override the background page if requested by a shell extension */
1862  if (PropPages[i].uiReplaceWith != 0 && hpsxa != NULL &&
1864  {
1865  /* The shell extension added one or more pages to replace a page.
1866  Don't create the built-in page anymore! */
1867  continue;
1868  }
1869 
1871  }
1872 
1873  if (hpsxa != NULL)
1875 
1876  ret = (LONG)(PropertySheet(&psh) != -1);
1877 
1878  if (hpsxa != NULL)
1880 
1881  return ret;
1882 }
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:1755
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
UINT WINAPI SHAddFromPropSheetExtArray(HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
Definition: shellord.c:1577
#define REGSTR_PATH_CONTROLSFOLDER
Definition: regstr.h:76
#define ZeroMemory
Definition: winbase.h:1642
HINSTANCE hApplet
Definition: access.c:17
UINT uiReplaceWith
Definition: mouse.c:1818
#define PSH_USECALLBACK
Definition: prsht.h:48
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: mouse.c:1798
#define MAX_CPL_PAGES
Definition: main.h:47
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 PSH_USEICONID
Definition: prsht.h:42
long LONG
Definition: pedump.c:60
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
smooth NULL
Definition: ftsmooth.c:416
WORD idDlg
Definition: mouse.c:1816
#define PROPSHEETHEADER
Definition: prsht.h:374
LONG_PTR LPARAM
Definition: windef.h:208
#define IDS_CPLNAME_1
Definition: resource.h:6
char TCHAR
Definition: xmlstorage.h:189
#define PSH_PROPTITLE
Definition: prsht.h:40
DLGPROC DlgProc
Definition: mouse.c:1817
int ret
static VOID InitPropSheetPage(PROPSHEETPAGE *psp, PSERVICEPROPSHEET dlgInfo, WORD idDlg, DLGPROC DlgProc)
Definition: propsheet.c:15
static BOOL CALLBACK PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: advmon.c:13
#define TEXT(s)
Definition: k32.h:26
static const struct @211 PropPages[]
unsigned int UINT
Definition: ndis.h:50
UINT WINAPI SHReplaceFromPropSheetExtArray(HPSXA hpsxa, UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam)
Definition: shellord.c:1724
#define PropertySheet
Definition: prsht.h:382
#define IDC_CPLICON_1
Definition: resource.h:4
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface)
Definition: shellord.c:1607
#define LoadString
Definition: winuser.h:5720
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

◆ PropSheetAddPage()

BOOL CALLBACK PropSheetAddPage ( HPROPSHEETPAGE  hpage,
LPARAM  lParam 
)

Definition at line 70 of file main.c.

71 {
73  if (ppsh != NULL && ppsh->nPages < MAX_CPL_PAGES)
74  {
75  ppsh->phpage[ppsh->nPages++] = hpage;
76  return TRUE;
77  }
78 
79  return FALSE;
80 }
#define TRUE
Definition: types.h:120
#define MAX_CPL_PAGES
Definition: main.h:47
smooth NULL
Definition: ftsmooth.c:416
#define PROPSHEETHEADER
Definition: prsht.h:374
LPARAM lParam
Definition: combotst.c:139

Referenced by InitPropSheetPage().

Variable Documentation

◆ hApplet

HINSTANCE hApplet

Definition at line 17 of file access.c.