3 * Copyright (C) 2004 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.
21 * PROJECT: ReactOS Main Control Panel
22 * FILE: lib/cpl/main/keyboard.c
23 * PURPOSE: Keyboard Control Panel
24 * PROGRAMMER: Eric Kohl
37 /* Property page dialog callback */
38 static INT_PTR CALLBACK
39 KeybSpeedProc(IN HWND hwndDlg
,
54 /* Property page dialog callback */
55 static INT_PTR CALLBACK
56 KeybHardwareProc(IN HWND hwndDlg
,
62 Guids
[0] = GUID_DEVCLASS_KEYBOARD
;
70 /* create the hardware page */
71 DeviceCreateHardwarePageEx(hwndDlg
,
73 sizeof(Guids
) / sizeof(Guids
[0]),
84 KeyboardApplet(HWND hwnd
, UINT uMsg
, LONG wParam
, LONG lParam
)
90 LoadString(hApplet
, IDS_CPLNAME_2
, Caption
, sizeof(Caption
) / sizeof(TCHAR
));
92 ZeroMemory(&psh
, sizeof(PROPSHEETHEADER
));
93 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
94 psh
.dwFlags
= PSH_PROPSHEETPAGE
| PSH_PROPTITLE
;
95 psh
.hwndParent
= NULL
;
96 psh
.hInstance
= hApplet
;
97 psh
.hIcon
= LoadIcon(hApplet
, MAKEINTRESOURCE(IDC_CPLICON_2
));
98 psh
.pszCaption
= Caption
;
99 psh
.nPages
= sizeof(psp
) / sizeof(PROPSHEETPAGE
);
103 InitPropSheetPage(&psp
[0], IDD_KEYBSPEED
, KeybSpeedProc
);
104 InitPropSheetPage(&psp
[1], IDD_HARDWARE
, KeybHardwareProc
);
106 return (LONG
)(PropertySheet(&psh
) != -1);