Commit d80ca173 authored by Alexandre Julliard's avatar Alexandre Julliard

shell32: Delay common controls initialization until needed.

parent 116e33d5
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 = \
......
......@@ -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)
......
......@@ -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;
......
......@@ -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))
......
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