From 1138fdcb707b783b3ab2fe84a90af6eabc9fb7cb Mon Sep 17 00:00:00 2001 From: Matthias Kupfer Date: Mon, 4 Aug 2008 18:56:22 +0000 Subject: [PATCH] =?UTF-8?q?Vytis=20Gird=C5=BEijauskas=20=20-=20Correctly=20call=20control=20panel=20applets?= =?UTF-8?q?=20from=20explorer.=20-=20See=20issue=20#3629=20for=20more=20de?= =?UTF-8?q?tails.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=35112 --- reactos/base/shell/explorer/taskbar/desktopbar.cpp | 4 ++-- reactos/base/shell/explorer/utility/utility.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.cpp b/reactos/base/shell/explorer/taskbar/desktopbar.cpp index cf31ab61f3e..6b1b8418580 100644 --- a/reactos/base/shell/explorer/taskbar/desktopbar.cpp +++ b/reactos/base/shell/explorer/taskbar/desktopbar.cpp @@ -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: diff --git a/reactos/base/shell/explorer/utility/utility.cpp b/reactos/base/shell/explorer/utility/utility.cpp index fdb74c2738d..bc928bed1e3 100644 --- a/reactos/base/shell/explorer/utility/utility.cpp +++ b/reactos/base/shell/explorer/utility/utility.cpp @@ -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); }