Commit d80ca173 authored by Alexandre Julliard's avatar Alexandre Julliard

shell32: Delay common controls initialization until needed.

parent 116e33d5
EXTRADEFS = -D_SHELL32_ EXTRADEFS = -D_SHELL32_
MODULE = shell32.dll MODULE = shell32.dll
IMPORTLIB = shell32 IMPORTLIB = shell32
IMPORTS = uuid shlwapi comctl32 user32 gdi32 advapi32 IMPORTS = uuid shlwapi user32 gdi32 advapi32
DELAYIMPORTS = ole32 oleaut32 shdocvw version DELAYIMPORTS = ole32 oleaut32 shdocvw version comctl32
EXTRALIBS = @CORESERVICESLIB@ EXTRALIBS = @CORESERVICESLIB@
C_SRCS = \ C_SRCS = \
......
...@@ -1110,12 +1110,17 @@ LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi) ...@@ -1110,12 +1110,17 @@ LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi)
DWORD r; DWORD r;
HRESULT hr; HRESULT hr;
const WCHAR * templateName; const WCHAR * templateName;
INITCOMMONCONTROLSEX icex;
info.hWnd = 0; info.hWnd = 0;
info.pidlRet = NULL; info.pidlRet = NULL;
info.lpBrowseInfo = lpbi; info.lpBrowseInfo = lpbi;
info.hwndTreeView = NULL; info.hwndTreeView = NULL;
icex.dwSize = sizeof( icex );
icex.dwICC = ICC_TREEVIEW_CLASSES;
InitCommonControlsEx( &icex );
hr = OleInitialize(NULL); hr = OleInitialize(NULL);
if (lpbi->ulFlags & BIF_NEWDIALOGSTYLE) if (lpbi->ulFlags & BIF_NEWDIALOGSTYLE)
......
...@@ -1272,7 +1272,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) ...@@ -1272,7 +1272,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH); GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH);
swShell32Name[MAX_PATH - 1] = '\0'; swShell32Name[MAX_PATH - 1] = '\0';
InitCommonControlsEx(NULL);
InitChangeNotifications(); InitChangeNotifications();
break; break;
......
...@@ -2075,10 +2075,15 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2 *iface, ...@@ -2075,10 +2075,15 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2 *iface,
LPSV2CVW2_PARAMS view_params) LPSV2CVW2_PARAMS view_params)
{ {
IShellViewImpl *This = impl_from_IShellView2(iface); IShellViewImpl *This = impl_from_IShellView2(iface);
INITCOMMONCONTROLSEX icex;
WNDCLASSW wc; WNDCLASSW wc;
HRESULT hr; HRESULT hr;
HWND wnd; HWND wnd;
icex.dwSize = sizeof( icex );
icex.dwICC = ICC_LISTVIEW_CLASSES;
InitCommonControlsEx( &icex );
TRACE("(%p)->(view_params %p)\n", iface, view_params); TRACE("(%p)->(view_params %p)\n", iface, view_params);
if (view_params->cbSize != sizeof(*view_params)) if (view_params->cbSize != sizeof(*view_params))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment