mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +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];
|
PROPSHEETPAGE psp[5];
|
||||||
PROPSHEETHEADER psh; // = { 0 };
|
PROPSHEETHEADER psh; // = { 0 };
|
||||||
TCHAR Caption[256];
|
TCHAR Caption[256];
|
||||||
|
INT nPage = 0;
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
UNREFERENCED_PARAMETER(wParam);
|
UNREFERENCED_PARAMETER(wParam);
|
||||||
UNREFERENCED_PARAMETER(uMsg);
|
UNREFERENCED_PARAMETER(uMsg);
|
||||||
|
|
||||||
|
if (uMsg == CPL_STARTWPARMSW && lParam != 0)
|
||||||
|
nPage = _wtoi((PWSTR)lParam);
|
||||||
|
|
||||||
LoadString(hApplet, IDS_CPLNAME, Caption, _countof(Caption));
|
LoadString(hApplet, IDS_CPLNAME, Caption, _countof(Caption));
|
||||||
|
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||||
|
@ -739,6 +743,9 @@ MmSysApplet(HWND hwnd,
|
||||||
InitPropSheetPage(&psp[3], IDD_VOICE,VoiceDlgProc);
|
InitPropSheetPage(&psp[3], IDD_VOICE,VoiceDlgProc);
|
||||||
InitPropSheetPage(&psp[4], IDD_HARDWARE,HardwareDlgProc);
|
InitPropSheetPage(&psp[4], IDD_HARDWARE,HardwareDlgProc);
|
||||||
|
|
||||||
|
if (nPage != 0 && nPage <= psh.nPages)
|
||||||
|
psh.nStartPage = nPage;
|
||||||
|
|
||||||
return (LONG)(PropertySheet(&psh) != -1);
|
return (LONG)(PropertySheet(&psh) != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -792,6 +799,9 @@ CPlApplet(HWND hwndCpl,
|
||||||
lParam2);
|
lParam2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case CPL_STARTWPARMSW:
|
||||||
|
return Applets[(UINT)lParam1].AppletProc(hwndCpl, uMsg, lParam1, lParam2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue