mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
display the hardware tab
svn path=/trunk/; revision=19561
This commit is contained in:
parent
e383ee91cc
commit
b14ed20764
7 changed files with 99 additions and 39 deletions
|
@ -24,6 +24,21 @@ BEGIN
|
|||
LTEXT "Property Page 3",-1,73,74,90,8
|
||||
END
|
||||
|
||||
IDD_KEYBSPEED DIALOGEX 0, 0, 246, 228
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
|
||||
CAPTION "Speed"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Keyboard Speed Page",-1,73,74,90,8
|
||||
END
|
||||
|
||||
IDD_HARDWARE DIALOGEX 0, 0, 246, 228
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
|
||||
CAPTION "Hardware"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CPLNAME_1 "Mouse"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <devguid.h>
|
||||
#include <commctrl.h>
|
||||
#include <prsht.h>
|
||||
#include <cpl.h>
|
||||
|
@ -35,56 +36,53 @@
|
|||
|
||||
/* Property page dialog callback */
|
||||
static INT_PTR CALLBACK
|
||||
Page1Proc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
KeybSpeedProc(IN HWND hwndDlg,
|
||||
IN UINT uMsg,
|
||||
IN WPARAM wParam,
|
||||
IN LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Property page dialog callback */
|
||||
static INT_PTR CALLBACK
|
||||
Page2Proc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
KeybHardwareProc(IN HWND hwndDlg,
|
||||
IN UINT uMsg,
|
||||
IN WPARAM wParam,
|
||||
IN LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
GUID Guids[] = {
|
||||
GUID_DEVCLASS_KEYBOARD
|
||||
};
|
||||
|
||||
/* create the hardware page */
|
||||
DeviceCreateHardwarePageEx(hwndDlg,
|
||||
Guids,
|
||||
sizeof(Guids) / sizeof(Guids[0]),
|
||||
HWPD_STANDARDLIST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Property page dialog callback */
|
||||
static INT_PTR CALLBACK
|
||||
Page3Proc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
LONG APIENTRY
|
||||
KeyboardApplet(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam)
|
||||
{
|
||||
PROPSHEETPAGE psp[3];
|
||||
PROPSHEETPAGE psp[2];
|
||||
PROPSHEETHEADER psh;
|
||||
TCHAR Caption[256];
|
||||
|
||||
|
@ -101,9 +99,8 @@ KeyboardApplet(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam)
|
|||
psh.nStartPage = 0;
|
||||
psh.ppsp = psp;
|
||||
|
||||
InitPropSheetPage(&psp[0], IDD_PROPPAGE1, Page1Proc);
|
||||
InitPropSheetPage(&psp[1], IDD_PROPPAGE2, Page2Proc);
|
||||
InitPropSheetPage(&psp[2], IDD_PROPPAGE3, Page3Proc);
|
||||
InitPropSheetPage(&psp[0], IDD_KEYBSPEED, KeybSpeedProc);
|
||||
InitPropSheetPage(&psp[1], IDD_HARDWARE, KeybHardwareProc);
|
||||
|
||||
return (LONG)(PropertySheet(&psh) != -1);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
* 05-01-2004 Created
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <initguid.h>
|
||||
#include <devguid.h>
|
||||
#include <commctrl.h>
|
||||
#include <cpl.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,19 @@
|
|||
#ifndef __CPL_MAIN_H
|
||||
#define __CPL_MAIN_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HWPD_STANDARDLIST = 0,
|
||||
HWPD_LARGELIST,
|
||||
HWPD_MAX = HWPD_LARGELIST
|
||||
} HWPAGE_DISPLAYMODE, *PHWPAGE_DISPLAYMODE;
|
||||
|
||||
HWND WINAPI
|
||||
DeviceCreateHardwarePageEx(HWND hWndParent,
|
||||
LPGUID lpGuids,
|
||||
UINT uNumberOfGuids,
|
||||
HWPAGE_DISPLAYMODE DisplayMode);
|
||||
|
||||
//typedef LONG (CALLBACK *APPLET_PROC)(VOID);
|
||||
|
||||
typedef struct _APPLET
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<library>kernel32</library>
|
||||
<library>user32</library>
|
||||
<library>comctl32</library>
|
||||
<library>devmgr</library>
|
||||
<file>keyboard.c</file>
|
||||
<file>main.c</file>
|
||||
<file>mouse.c</file>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <devguid.h>
|
||||
#include <commctrl.h>
|
||||
#include <cpl.h>
|
||||
|
||||
|
@ -85,10 +86,38 @@ Page3Proc(
|
|||
}
|
||||
|
||||
|
||||
/* Property page dialog callback */
|
||||
static INT_PTR CALLBACK
|
||||
MouseHardwareProc(IN HWND hwndDlg,
|
||||
IN UINT uMsg,
|
||||
IN WPARAM wParam,
|
||||
IN LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
GUID Guids[] = {
|
||||
GUID_DEVCLASS_MOUSE
|
||||
};
|
||||
|
||||
/* create the hardware page */
|
||||
DeviceCreateHardwarePageEx(hwndDlg,
|
||||
Guids,
|
||||
sizeof(Guids) / sizeof(Guids[0]),
|
||||
HWPD_STANDARDLIST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
LONG APIENTRY
|
||||
MouseApplet(HWND hwnd, UINT uMsg, LONG lParam1, LONG lParam2)
|
||||
{
|
||||
PROPSHEETPAGE psp[3];
|
||||
PROPSHEETPAGE psp[4];
|
||||
PROPSHEETHEADER psh;
|
||||
TCHAR Caption[256];
|
||||
|
||||
|
@ -108,6 +137,7 @@ MouseApplet(HWND hwnd, UINT uMsg, LONG lParam1, LONG lParam2)
|
|||
InitPropSheetPage(&psp[0], IDD_PROPPAGE1, Page1Proc);
|
||||
InitPropSheetPage(&psp[1], IDD_PROPPAGE2, Page2Proc);
|
||||
InitPropSheetPage(&psp[2], IDD_PROPPAGE3, Page3Proc);
|
||||
InitPropSheetPage(&psp[3], IDD_HARDWARE, MouseHardwareProc);
|
||||
|
||||
return (LONG)(PropertySheet(&psh) != -1);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#define IDD_PROPPAGE1 100
|
||||
#define IDD_PROPPAGE2 101
|
||||
#define IDD_PROPPAGE3 102
|
||||
#define IDD_KEYBSPEED 103
|
||||
#define IDD_HARDWARE 104
|
||||
|
||||
#define IDS_CPLNAME_1 1000
|
||||
#define IDS_CPLDESCRIPTION_1 1001
|
||||
|
|
Loading…
Reference in a new issue