Alexandre Julliard : shell32: Delay common controls initialization until needed.
Alexandre Julliard
julliard at winehq.org
Thu Oct 17 13:51:50 CDT 2013
Module: wine
Branch: master
Commit: d80ca173af68add8ef37a92acaa6eac6f7589546
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d80ca173af68add8ef37a92acaa6eac6f7589546
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Oct 17 18:05:28 2013 +0200
shell32: Delay common controls initialization until needed.
---
dlls/shell32/Makefile.in | 4 ++--
dlls/shell32/brsfolder.c | 5 +++++
dlls/shell32/shell32_main.c | 1 -
dlls/shell32/shlview.c | 5 +++++
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in
index dd3f8f4..fb9b2c7 100644
--- a/dlls/shell32/Makefile.in
+++ b/dlls/shell32/Makefile.in
@@ -1,8 +1,8 @@
EXTRADEFS = -D_SHELL32_
MODULE = shell32.dll
IMPORTLIB = shell32
-IMPORTS = uuid shlwapi comctl32 user32 gdi32 advapi32
-DELAYIMPORTS = ole32 oleaut32 shdocvw version
+IMPORTS = uuid shlwapi user32 gdi32 advapi32
+DELAYIMPORTS = ole32 oleaut32 shdocvw version comctl32
EXTRALIBS = @CORESERVICESLIB@
C_SRCS = \
diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index a14c172..9d95293 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -1110,12 +1110,17 @@ LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi)
DWORD r;
HRESULT hr;
const WCHAR * templateName;
+ INITCOMMONCONTROLSEX icex;
info.hWnd = 0;
info.pidlRet = NULL;
info.lpBrowseInfo = lpbi;
info.hwndTreeView = NULL;
+ icex.dwSize = sizeof( icex );
+ icex.dwICC = ICC_TREEVIEW_CLASSES;
+ InitCommonControlsEx( &icex );
+
hr = OleInitialize(NULL);
if (lpbi->ulFlags & BIF_NEWDIALOGSTYLE)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index 0bc88b0..1e37b47 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -1272,7 +1272,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH);
swShell32Name[MAX_PATH - 1] = '\0';
- InitCommonControlsEx(NULL);
InitChangeNotifications();
break;
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 29593f8..c937cce 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -2075,10 +2075,15 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2 *iface,
LPSV2CVW2_PARAMS view_params)
{
IShellViewImpl *This = impl_from_IShellView2(iface);
+ INITCOMMONCONTROLSEX icex;
WNDCLASSW wc;
HRESULT hr;
HWND wnd;
+ icex.dwSize = sizeof( icex );
+ icex.dwICC = ICC_LISTVIEW_CLASSES;
+ InitCommonControlsEx( &icex );
+
TRACE("(%p)->(view_params %p)\n", iface, view_params);
if (view_params->cbSize != sizeof(*view_params))
More information about the wine-cvs
mailing list