Vytis Girdžijauskas <cman AT cman DOT us>

- Correctly call control panel applets from explorer.
- See issue #3629 for more details.

svn path=/trunk/; revision=35112
This commit is contained in:
Matthias Kupfer 2008-08-04 18:56:22 +00:00
parent 40d661edfb
commit 1138fdcb70
2 changed files with 7 additions and 5 deletions

View file

@ -405,11 +405,11 @@ int DesktopBar::Command(int id, int code)
break;
case ID_ABOUT_EXPLORER:
explorer_about(_hwnd);
explorer_about(g_Globals._hwndDesktop);
break;
case ID_DESKTOPBAR_SETTINGS:
ExplorerPropertySheet(_hwnd);
ExplorerPropertySheet(g_Globals._hwndDesktop);
break;
case ID_MINIMIZE_ALL:

View file

@ -382,10 +382,12 @@ BOOL RunDLL(HWND hwnd, LPCTSTR dllname, LPCSTR procname, LPCTSTR cmdline, UINT n
BOOL launch_cpanel(HWND hwnd, LPCTSTR applet)
{
//launch_file(_hwnd, applet, SW_SHOWNORMAL); // This would be enough, but we want the to use the most direct and fastest call.
//launch_file(_hwnd, String(TEXT("rundll32.exe /d shell32.dll,Control_RunDLL "))+applet, SW_SHOWNORMAL);
TCHAR parameters[MAX_PATH];
_tcscpy(parameters, TEXT("shell32.dll,Control_RunDLL "));
_tcscat(parameters, applet);
return RunDLL(hwnd, TEXT("shell32"), CONTROL_RUNDLL, applet, SW_SHOWNORMAL);
return ((int)ShellExecute(hwnd, TEXT("open"), TEXT("rundll32.exe"), parameters, NULL, SW_SHOWDEFAULT) > 32);
}