https://git.reactos.org/?p=reactos.git;a=commitdiff;h=065a0bbf0f140f551dc1a…
commit 065a0bbf0f140f551dc1a7993cfe209b1370ae3b
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Tue Feb 11 05:40:59 2020 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Tue Feb 11 05:42:27 2020 +0100
[MMSYS] Select a property page by command line, for expample 'control
mmsys.cpl,,1'
---
dll/cpl/mmsys/mmsys.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dll/cpl/mmsys/mmsys.c b/dll/cpl/mmsys/mmsys.c
index 7b8ab726446..b77b390c25d 100644
--- a/dll/cpl/mmsys/mmsys.c
+++ b/dll/cpl/mmsys/mmsys.c
@@ -715,11 +715,15 @@ MmSysApplet(HWND hwnd,
PROPSHEETPAGE psp[5];
PROPSHEETHEADER psh; // = { 0 };
TCHAR Caption[256];
+ INT nPage = 0;
UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam);
UNREFERENCED_PARAMETER(uMsg);
+ if (uMsg == CPL_STARTWPARMSW && lParam != 0)
+ nPage = _wtoi((PWSTR)lParam);
+
LoadString(hApplet, IDS_CPLNAME, Caption, _countof(Caption));
psh.dwSize = sizeof(PROPSHEETHEADER);
@@ -739,6 +743,9 @@ MmSysApplet(HWND hwnd,
InitPropSheetPage(&psp[3], IDD_VOICE,VoiceDlgProc);
InitPropSheetPage(&psp[4], IDD_HARDWARE,HardwareDlgProc);
+ if (nPage != 0 && nPage <= psh.nPages)
+ psh.nStartPage = nPage;
+
return (LONG)(PropertySheet(&psh) != -1);
}
@@ -792,6 +799,9 @@ CPlApplet(HWND hwndCpl,
lParam2);
break;
}
+
+ case CPL_STARTWPARMSW:
+ return Applets[(UINT)lParam1].AppletProc(hwndCpl, uMsg, lParam1, lParam2);
}
return FALSE;