f6e3aa94aeaf7e1ad52db8327d8c87a175776b97
4 * FILE: dll/win32/input/input.c
6 * PROGRAMMER: Dmitry Chapyshev (lentind@yandex.ru)
15 #define NUM_APPLETS (1)
17 LONG CALLBACK
SystemApplet(VOID
);
18 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
= NULL
;
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
)
76 UNREFERENCED_PARAMETER(hwndCPl
);
88 CPlInfo
= (CPLINFO
*)lParam2
;
90 CPlInfo
->idIcon
= Applets
[i
].idIcon
;
91 CPlInfo
->idName
= Applets
[i
].idName
;
92 CPlInfo
->idInfo
= Applets
[i
].idDescription
;
96 Applets
[i
].AppletProc();
105 DllMain(HINSTANCE hinstDLL
, DWORD dwReason
, LPVOID lpvReserved
)
107 UNREFERENCED_PARAMETER(lpvReserved
);
111 case DLL_PROCESS_ATTACH
:
112 case DLL_THREAD_ATTACH
:
114 hProcessHeap
= GetProcessHeap();