https://git.reactos.org/?p=reactos.git;a=commitdiff;h=065e70048daa70bbe2db1…
commit 065e70048daa70bbe2db15175441c627782ad11d
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Apr 22 23:59:28 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Mon Apr 23 00:00:46 2018 +0200
[SYSSETUP] Initialize the property sheet page dialog and implement the Defaults
button
---
dll/win32/syssetup/proppage.c | 80 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/dll/win32/syssetup/proppage.c b/dll/win32/syssetup/proppage.c
index 6cab3faab1..d200a841ea 100644
--- a/dll/win32/syssetup/proppage.c
+++ b/dll/win32/syssetup/proppage.c
@@ -110,6 +110,81 @@ MouseOnDialogInit(
(LPARAM)szBuffer);
}
+ /* Set the input buffer length range: 100-300 */
+ SendDlgItemMessageW(hwndDlg,
+ IDC_PS2MOUSEINPUTUPDN,
+ UDM_SETRANGE32,
+ 100,
+ 300);
+
+ SendDlgItemMessageW(hwndDlg,
+ IDC_PS2MOUSEINPUTUPDN,
+ UDM_SETPOS32,
+ 0,
+ 100);
+}
+
+
+static
+VOID
+MouseOnCommand(
+ HWND hwndDlg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (LOWORD(wParam))
+ {
+ case IDC_PS2MOUSESAMPLERATE:
+ case IDC_PS2MOUSEWHEEL:
+ case IDC_PS2MOUSEINPUTLEN:
+ case IDC_PS2MOUSEFASTINIT:
+ if (HIWORD(wParam) == CBN_SELCHANGE ||
+ HIWORD(wParam) == CBN_EDITCHANGE)
+ {
+ /* Enable the Apply button */
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ }
+ break;
+
+ case IDC_PS2MOUSEDEFAULTS:
+ if (HIWORD(wParam) == BN_CLICKED)
+ {
+ /* Sample rate: 100 */
+ SendDlgItemMessageW(hwndDlg,
+ IDC_PS2MOUSESAMPLERATE,
+ CB_SETCURSEL,
+ 4,
+ 0);
+
+ /* Wheel detection: Assume wheel present */
+ SendDlgItemMessageW(hwndDlg,
+ IDC_PS2MOUSEWHEEL,
+ CB_SETCURSEL,
+ 2,
+ 0);
+
+ /* Input buffer length: 100 packets */
+ SendDlgItemMessageW(hwndDlg,
+ IDC_PS2MOUSEINPUTUPDN,
+ UDM_SETPOS32,
+ 0,
+ 100);
+
+ /* Fast Initialization: Checked */
+ SendDlgItemMessage(hwndDlg,
+ IDC_PS2MOUSEFASTINIT,
+ BM_SETCHECK,
+ (WPARAM)BST_CHECKED,
+ (LPARAM)0);
+
+ /* Enable the Apply button */
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ }
+ break;
+
+ default:
+ break;
+ }
}
@@ -129,6 +204,11 @@ MouseDlgProc(
case WM_INITDIALOG:
MouseOnDialogInit(hwndDlg, lParam);
return TRUE;
+
+ case WM_COMMAND:
+ MouseOnCommand(hwndDlg, wParam, lParam);
+ break;
+
}
return FALSE;