4 * FILE: dll/win32/input/input.c
6 * PROGRAMMER: Dmitry Chapyshev (lentind@yandex.ru)
14 #define NUM_APPLETS (1)
16 LONG CALLBACK
SystemApplet(VOID
);
17 HINSTANCE hApplet
= 0;
22 APPLET Applets
[NUM_APPLETS
] =
24 {IDI_CPLSYSTEM
, IDS_CPLSYSTEMNAME
, IDS_CPLSYSTEMDESCRIPTION
, SystemApplet
}
29 InitPropSheetPage(PROPSHEETPAGE
*psp
, WORD idDlg
, DLGPROC DlgProc
)
31 ZeroMemory(psp
, sizeof(PROPSHEETPAGE
));
32 psp
->dwSize
= sizeof(PROPSHEETPAGE
);
33 psp
->dwFlags
= PSP_DEFAULT
;
34 psp
->hInstance
= hApplet
;
35 psp
->pszTemplate
= MAKEINTRESOURCE(idDlg
);
36 psp
->pfnDlgProc
= DlgProc
;
49 LoadString(hApplet
, IDS_CPLSYSTEMNAME
, Caption
, sizeof(Caption
) / sizeof(TCHAR
));
51 ZeroMemory(&psh
, sizeof(PROPSHEETHEADER
));
52 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
53 psh
.dwFlags
= PSH_PROPSHEETPAGE
;
54 psh
.hwndParent
= hCPLWindow
;
55 psh
.hInstance
= hApplet
;
56 psh
.hIcon
= LoadIcon(hApplet
, MAKEINTRESOURCE(IDI_CPLSYSTEM
));
57 psh
.pszCaption
= Caption
;
58 psh
.nPages
= sizeof(psp
) / sizeof(PROPSHEETPAGE
);
61 psh
.pfnCallback
= NULL
;
63 InitPropSheetPage(&psp
[0], IDD_PROPPAGESETTINGS
, (DLGPROC
) SettingPageProc
);
65 return (LONG
)(PropertySheet(&psh
) != -1);
69 /* Control Panel Callback */
71 CPlApplet(HWND hwndCPl
, UINT uMsg
, LPARAM lParam1
, LPARAM lParam2
)
86 CPlInfo
= (CPLINFO
*)lParam2
;
88 CPlInfo
->idIcon
= Applets
[i
].idIcon
;
89 CPlInfo
->idName
= Applets
[i
].idName
;
90 CPlInfo
->idInfo
= Applets
[i
].idDescription
;
95 Applets
[i
].AppletProc();
104 DllMain(HINSTANCE hinstDLL
, DWORD dwReason
, LPVOID lpvReserved
)
106 UNREFERENCED_PARAMETER(lpvReserved
);
110 case DLL_PROCESS_ATTACH
:
111 case DLL_THREAD_ATTACH
:
113 hProcessHeap
= GetProcessHeap();