[SYSSETUP] Add the property sheet page and initialize it
authorEric Kohl <eric.kohl@reactos.org>
Sun, 22 Apr 2018 12:26:11 +0000 (14:26 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 22 Apr 2018 12:26:11 +0000 (14:26 +0200)
- Add the wheel detection option strings.
- Add the property sheet page and initialize the dialog.

32 files changed:
dll/win32/syssetup/lang/bg-BG.rc
dll/win32/syssetup/lang/cs-CZ.rc
dll/win32/syssetup/lang/da-DK.rc
dll/win32/syssetup/lang/de-DE.rc
dll/win32/syssetup/lang/el-GR.rc
dll/win32/syssetup/lang/en-US.rc
dll/win32/syssetup/lang/es-ES.rc
dll/win32/syssetup/lang/et-EE.rc
dll/win32/syssetup/lang/fi-FI.rc
dll/win32/syssetup/lang/fr-FR.rc
dll/win32/syssetup/lang/he-IL.rc
dll/win32/syssetup/lang/hu-HU.rc
dll/win32/syssetup/lang/id-ID.rc
dll/win32/syssetup/lang/it-IT.rc
dll/win32/syssetup/lang/ja-JP.rc
dll/win32/syssetup/lang/lt-LT.rc
dll/win32/syssetup/lang/nl-NL.rc
dll/win32/syssetup/lang/no-NO.rc
dll/win32/syssetup/lang/pl-PL.rc
dll/win32/syssetup/lang/pt-BR.rc
dll/win32/syssetup/lang/ro-RO.rc
dll/win32/syssetup/lang/ru-RU.rc
dll/win32/syssetup/lang/sk-SK.rc
dll/win32/syssetup/lang/sq-AL.rc
dll/win32/syssetup/lang/sv-SE.rc
dll/win32/syssetup/lang/th-TH.rc
dll/win32/syssetup/lang/tr-TR.rc
dll/win32/syssetup/lang/uk-UA.rc
dll/win32/syssetup/lang/zh-CN.rc
dll/win32/syssetup/lang/zh-TW.rc
dll/win32/syssetup/proppage.c
dll/win32/syssetup/resource.h

index 8182f53..247332e 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Общи файлове"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 120defd..d5f230d 100644 (file)
@@ -216,3 +216,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 949fbaf..f6c10a6 100644 (file)
@@ -229,3 +229,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Programmer"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 9445175..b9c32de 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Programme"
     IDS_COMMONFILES "Gemeinsame Dateien"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Erkennung deaktiviert"
+    IDS_LOOKFORWHEEL "Rad suchen"
+    IDS_ASSUMEPRESENT "Annehmen, dass Rad vorhanden ist"
+END
index 7b2edda..03f53ca 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 8142e80..f131e0a 100644 (file)
@@ -230,3 +230,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 8112307..25081b0 100644 (file)
@@ -211,3 +211,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Archivos de programa"
     IDS_COMMONFILES "Archivos comunes"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 91bb306..5f1778f 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index f780fcd..76ded8a 100644 (file)
@@ -229,3 +229,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 3316081..124a71f 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Fichiers communs"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index ac46750..015396d 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index b2c67f5..6a22058 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 41c7efe..41c8732 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index d3a900e..e5d5a75 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Programmi"
     IDS_COMMONFILES "File comuni"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index a2b4dff..e38b38f 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 1132687..458ce0e 100644 (file)
@@ -229,3 +229,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index c7e2529..5b50e73 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 9730718..3c08e54 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Programfiler"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index a28d1fa..36ae269 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 58b35ba..00a2953 100644 (file)
@@ -210,3 +210,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Arquivos de programas"
     IDS_COMMONFILES "Arquivos comuns"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 7235f81..68ce3f9 100644 (file)
@@ -219,3 +219,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Fișiere de program"
     IDS_COMMONFILES "Fișiere comune"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index a57a28a..e4a4208 100644 (file)
@@ -212,3 +212,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 152e138..3f550d3 100644 (file)
@@ -216,3 +216,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 48b453a..37344c3 100644 (file)
@@ -229,3 +229,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Dokumente Programi"
     IDS_COMMONFILES "Dokumente Zakonshëm"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 2d692e3..bece96b 100644 (file)
@@ -229,3 +229,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program"
     IDS_COMMONFILES "Delade filer"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 3fb5b3c..de77645 100644 (file)
@@ -229,3 +229,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\โปรแกรมไฟล์"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 41c633c..5f67923 100644 (file)
@@ -212,3 +212,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\İzlence Kütükleri"
     IDS_COMMONFILES "Ortak Kütükler"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index f2c9f19..06508a5 100644 (file)
@@ -218,3 +218,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 3617aba..15133dc 100644 (file)
@@ -215,3 +215,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index 9b9dbaf..c4ca3f4 100644 (file)
@@ -211,3 +211,10 @@ BEGIN
     IDS_PROGRAMFILES "%SystemDrive%\\Program Files"
     IDS_COMMONFILES "Common Files"
 END
+
+STRINGTABLE
+BEGIN
+    IDS_DETECTIONDISABLED "Detection disabled"
+    IDS_LOOKFORWHEEL "Look for wheel"
+    IDS_ASSUMEPRESENT "Assume wheel is present"
+END
index fa2ee4a..6cab3fa 100644 (file)
@@ -11,6 +11,8 @@
 #define NDEBUG
 #include <debug.h>
 
+DWORD MouseSampleRates[] = {20, 40, 60, 80, 100, 200};
+
 
 /*
  * @implemented
@@ -77,8 +79,65 @@ LegacyDriverPropPageProvider(
 }
 
 
+static
+VOID
+MouseOnDialogInit(
+    HWND hwndDlg,
+    LPARAM lParam)
+{
+    WCHAR szBuffer[64];
+    UINT i;
+
+    /* Add the sample rates */
+    for (i = 0; i < ARRAYSIZE(MouseSampleRates); i++)
+    {
+        wsprintf(szBuffer, L"%lu", MouseSampleRates[i]);
+        SendDlgItemMessageW(hwndDlg,
+                            IDC_PS2MOUSESAMPLERATE,
+                            CB_ADDSTRING,
+                            0,
+                            (LPARAM)szBuffer);
+    }
+
+    /* Add the detection options */
+    for (i = IDS_DETECTIONDISABLED; i <= IDS_ASSUMEPRESENT; i++)
+    {
+        LoadStringW(hDllInstance, i, szBuffer, ARRAYSIZE(szBuffer));
+        SendDlgItemMessageW(hwndDlg,
+                            IDC_PS2MOUSEWHEEL,
+                            CB_ADDSTRING,
+                            0,
+                            (LPARAM)szBuffer);
+    }
+
+}
+
+
+static
+INT_PTR
+CALLBACK
+MouseDlgProc(
+    HWND hwndDlg,
+    UINT uMsg,
+    WPARAM wParam,
+    LPARAM lParam)
+{
+    DPRINT("MouseDlgProc\n");
+
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+            MouseOnDialogInit(hwndDlg, lParam);
+            return TRUE;
+    }
+
+    return FALSE;
+}
+
+
+
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL
 WINAPI
@@ -87,10 +146,38 @@ PS2MousePropPageProvider(
     _In_ LPFNADDPROPSHEETPAGE lpfnAddPropSheetPageProc,
     _In_ LPARAM lParam)
 {
-    DPRINT1("PS2MousePropPageProvider(%p %p %lx)\n",
+    PROPSHEETPAGEW PropSheetPage;
+    HPROPSHEETPAGE hPropSheetPage;
+
+    DPRINT("PS2MousePropPageProvider(%p %p %lx)\n",
            lpPropSheetPageRequest, lpfnAddPropSheetPageProc, lParam);
-    UNIMPLEMENTED;
-    return FALSE;
+
+    if (lpPropSheetPageRequest->PageRequested != SPPSR_ENUM_ADV_DEVICE_PROPERTIES)
+        return FALSE;
+
+    PropSheetPage.dwSize = sizeof(PROPSHEETPAGEW);
+    PropSheetPage.dwFlags = 0;
+    PropSheetPage.hInstance = hDllInstance;
+    PropSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_PS2MOUSEPROPERTIES);
+    PropSheetPage.pfnDlgProc = MouseDlgProc;
+    PropSheetPage.lParam = 0;
+    PropSheetPage.pfnCallback = NULL;
+
+    hPropSheetPage = CreatePropertySheetPageW(&PropSheetPage);
+    if (hPropSheetPage == NULL)
+    {
+        DPRINT1("CreatePropertySheetPageW() failed!\n");
+        return FALSE;
+    }
+
+    if (!(*lpfnAddPropSheetPageProc)(hPropSheetPage, lParam))
+    {
+        DPRINT1("lpfnAddPropSheetPageProc() failed!\n");
+        DestroyPropertySheetPage(hPropSheetPage);
+        return FALSE;
+    }
+
+    return TRUE;
 }
 
 
index 8776eea..c9dcb3a 100644 (file)
 #define IDS_PROGRAMFILES    3600
 #define IDS_COMMONFILES     3601
 
+#define IDS_DETECTIONDISABLED 3700
+#define IDS_LOOKFORWHEEL      3701
+#define IDS_ASSUMEPRESENT     3702
+
 #define IDR_GPL 4000