display the hardware tab
Modified: trunk/reactos/lib/cpl/main/En.rc
Modified: trunk/reactos/lib/cpl/main/keyboard.c
Modified: trunk/reactos/lib/cpl/main/main.c
Modified: trunk/reactos/lib/cpl/main/main.h
Modified: trunk/reactos/lib/cpl/main/main.xml
Modified: trunk/reactos/lib/cpl/main/mouse.c
Modified: trunk/reactos/lib/cpl/main/resource.h

Modified: trunk/reactos/lib/cpl/main/En.rc
--- trunk/reactos/lib/cpl/main/En.rc	2005-11-25 16:30:41 UTC (rev 19560)
+++ trunk/reactos/lib/cpl/main/En.rc	2005-11-25 17:02:18 UTC (rev 19561)
@@ -24,6 +24,21 @@
   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"

Modified: trunk/reactos/lib/cpl/main/keyboard.c
--- trunk/reactos/lib/cpl/main/keyboard.c	2005-11-25 16:30:41 UTC (rev 19560)
+++ trunk/reactos/lib/cpl/main/keyboard.c	2005-11-25 17:02:18 UTC (rev 19561)
@@ -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 @@
   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);
 }

Modified: trunk/reactos/lib/cpl/main/main.c
--- trunk/reactos/lib/cpl/main/main.c	2005-11-25 16:30:41 UTC (rev 19560)
+++ trunk/reactos/lib/cpl/main/main.c	2005-11-25 17:02:18 UTC (rev 19561)
@@ -26,6 +26,8 @@
  *      05-01-2004  Created
  */
 #include <windows.h>
+#include <initguid.h>
+#include <devguid.h>
 #include <commctrl.h>
 #include <cpl.h>
 

Modified: trunk/reactos/lib/cpl/main/main.h
--- trunk/reactos/lib/cpl/main/main.h	2005-11-25 16:30:41 UTC (rev 19560)
+++ trunk/reactos/lib/cpl/main/main.h	2005-11-25 17:02:18 UTC (rev 19561)
@@ -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

Modified: trunk/reactos/lib/cpl/main/main.xml
--- trunk/reactos/lib/cpl/main/main.xml	2005-11-25 16:30:41 UTC (rev 19560)
+++ trunk/reactos/lib/cpl/main/main.xml	2005-11-25 17:02:18 UTC (rev 19561)
@@ -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>

Modified: trunk/reactos/lib/cpl/main/mouse.c
--- trunk/reactos/lib/cpl/main/mouse.c	2005-11-25 16:30:41 UTC (rev 19560)
+++ trunk/reactos/lib/cpl/main/mouse.c	2005-11-25 17:02:18 UTC (rev 19561)
@@ -25,6 +25,7 @@
  */
 
 #include <windows.h>
+#include <devguid.h>
 #include <commctrl.h>
 #include <cpl.h>
 
@@ -85,10 +86,38 @@
 }
 
 
+/* 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 @@
   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);
 }

Modified: trunk/reactos/lib/cpl/main/resource.h
--- trunk/reactos/lib/cpl/main/resource.h	2005-11-25 16:30:41 UTC (rev 19560)
+++ trunk/reactos/lib/cpl/main/resource.h	2005-11-25 17:02:18 UTC (rev 19561)
@@ -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