mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[DESK][CONTROL] Select property pages by command line, for example 'control desk.cpl,,1' and fix 'control color'
This commit is contained in:
parent
7a98d28d7f
commit
a88d7b5c2f
2 changed files with 9 additions and 2 deletions
|
@ -86,7 +86,7 @@ wWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
/* Check one of the built-in control panel handlers */
|
/* Check one of the built-in control panel handlers */
|
||||||
if (!_wcsicmp(lpCmdLine, L"admintools")) return OpenShellFolder(L"\\::{D20EA4E1-3957-11d2-A40B-0C5020524153}");
|
if (!_wcsicmp(lpCmdLine, L"admintools")) return OpenShellFolder(L"\\::{D20EA4E1-3957-11d2-A40B-0C5020524153}");
|
||||||
else if (!_wcsicmp(lpCmdLine, L"color")) return RunControlPanel(L"desk.cpl"); /* TODO: Switch to the "Apperance" tab */
|
else if (!_wcsicmp(lpCmdLine, L"color")) return RunControlPanel(L"desk.cpl,,2");
|
||||||
else if (!_wcsicmp(lpCmdLine, L"date/time")) return RunControlPanel(L"timedate.cpl");
|
else if (!_wcsicmp(lpCmdLine, L"date/time")) return RunControlPanel(L"timedate.cpl");
|
||||||
else if (!_wcsicmp(lpCmdLine, L"desktop")) return RunControlPanel(L"desk.cpl");
|
else if (!_wcsicmp(lpCmdLine, L"desktop")) return RunControlPanel(L"desk.cpl");
|
||||||
else if (!_wcsicmp(lpCmdLine, L"folders")) return RUNDLL(L"shell32.dll,Options_RunDLL");
|
else if (!_wcsicmp(lpCmdLine, L"folders")) return RUNDLL(L"shell32.dll,Options_RunDLL");
|
||||||
|
|
|
@ -150,6 +150,7 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
|
||||||
LPCWSTR pwszSelectedTab = NULL;
|
LPCWSTR pwszSelectedTab = NULL;
|
||||||
LPCWSTR pwszFile = NULL;
|
LPCWSTR pwszFile = NULL;
|
||||||
LPCWSTR pwszAction = NULL;
|
LPCWSTR pwszAction = NULL;
|
||||||
|
INT nPage = 0;
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(wParam);
|
UNREFERENCED_PARAMETER(wParam);
|
||||||
|
|
||||||
|
@ -160,6 +161,8 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
|
||||||
int argc;
|
int argc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
nPage = _wtoi((PWSTR)lParam);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
argv = CommandLineToArgvW((LPCWSTR)lParam, &argc);
|
argv = CommandLineToArgvW((LPCWSTR)lParam, &argc);
|
||||||
#else
|
#else
|
||||||
|
@ -232,6 +235,9 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
|
||||||
/* NOTE: Don't call SHAddFromPropSheetExtArray here because this applet only allows
|
/* NOTE: Don't call SHAddFromPropSheetExtArray here because this applet only allows
|
||||||
replacing the background page but not extending the applet by more pages */
|
replacing the background page but not extending the applet by more pages */
|
||||||
|
|
||||||
|
if (nPage != 0 && psh.nStartPage == 0)
|
||||||
|
psh.nStartPage = nPage;
|
||||||
|
|
||||||
PropertySheet(&psh);
|
PropertySheet(&psh);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
@ -272,6 +278,7 @@ CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
||||||
case CPL_DBLCLK:
|
case CPL_DBLCLK:
|
||||||
Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
|
Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CPL_STARTWPARMSW:
|
case CPL_STARTWPARMSW:
|
||||||
return Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
|
return Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue