mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[MMSYS] Select a property page by command line, for expample 'control mmsys.cpl,,1'
This commit is contained in:
parent
9e53e7cd5b
commit
065a0bbf0f
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue