3 * Copyright (C) 2007 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * FILE: dll/win32/input/input.c
24 * PROGRAMMER: Dmitry Chapyshev (lentind@yandex.ru)
42 #define NUM_APPLETS (1)
44 LONG CALLBACK
SystemApplet(VOID
);
45 HINSTANCE hApplet
= 0;
48 APPLET Applets
[NUM_APPLETS
] =
50 {IDI_CPLSYSTEM
, IDS_CPLSYSTEMNAME
, IDS_CPLSYSTEMDESCRIPTION
, SystemApplet
}
55 InitPropSheetPage(PROPSHEETPAGE
*psp
, WORD idDlg
, DLGPROC DlgProc
)
57 ZeroMemory(psp
, sizeof(PROPSHEETPAGE
));
58 psp
->dwSize
= sizeof(PROPSHEETPAGE
);
59 psp
->dwFlags
= PSP_DEFAULT
;
60 psp
->hInstance
= hApplet
;
61 psp
->pszTemplate
= MAKEINTRESOURCE(idDlg
);
62 psp
->pfnDlgProc
= DlgProc
;
75 LoadString(hApplet
, IDS_CPLSYSTEMNAME
, Caption
, sizeof(Caption
) / sizeof(TCHAR
));
77 ZeroMemory(&psh
, sizeof(PROPSHEETHEADER
));
78 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
79 psh
.dwFlags
= PSH_PROPSHEETPAGE
;
80 psh
.hwndParent
= NULL
;
81 psh
.hInstance
= hApplet
;
82 psh
.hIcon
= LoadIcon(hApplet
, MAKEINTRESOURCE(IDI_CPLSYSTEM
));
83 psh
.pszCaption
= Caption
;
84 psh
.nPages
= sizeof(psp
) / sizeof(PROPSHEETPAGE
);
87 psh
.pfnCallback
= NULL
;
89 InitPropSheetPage(&psp
[0], IDD_PROPPAGESETTINGS
, (DLGPROC
) SettingPageProc
);
90 InitPropSheetPage(&psp
[1], IDD_PROPPAGEADVANCED
, (DLGPROC
) AdvancedPageProc
);
92 return (LONG
)(PropertySheet(&psh
) != -1);
96 /* Control Panel Callback */
98 CPlApplet(HWND hwndCPl
, UINT uMsg
, LPARAM lParam1
, LPARAM lParam2
)
103 UNREFERENCED_PARAMETER(hwndCPl
);
115 CPlInfo
= (CPLINFO
*)lParam2
;
117 CPlInfo
->idIcon
= Applets
[i
].idIcon
;
118 CPlInfo
->idName
= Applets
[i
].idName
;
119 CPlInfo
->idInfo
= Applets
[i
].idDescription
;
123 Applets
[i
].AppletProc();
132 DllMain(HINSTANCE hinstDLL
, DWORD dwReason
, LPVOID lpvReserved
)
134 UNREFERENCED_PARAMETER(lpvReserved
);
138 case DLL_PROCESS_ATTACH
:
139 case DLL_THREAD_ATTACH
: