Commit dca8e256 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

ieframe: Enable visual styles.

ieframe.dll uses manifest at ID 123. However, IEWinMain() is not called from rundll32.exe or Control_RunDLL() so the manifest needs to be activated in IEWinMain(). This allows iexplore.exe to enable theming. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 56b8a67f
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="Wine.Ieframe" version="0.0.0.0"/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
...@@ -108,6 +108,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL ...@@ -108,6 +108,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
/* @makedep: ieframe.manifest */
123 RT_MANIFEST ieframe.manifest
/* @makedep: ietoolbar.bmp */ /* @makedep: ietoolbar.bmp */
IDB_IETOOLBAR BITMAP ietoolbar.bmp IDB_IETOOLBAR BITMAP ietoolbar.bmp
......
...@@ -1125,10 +1125,13 @@ static void release_dde(void) ...@@ -1125,10 +1125,13 @@ static void release_dde(void)
*/ */
DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow) DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
{ {
BOOL embedding = FALSE, nohome = FALSE, manager = FALSE, activated = FALSE;
MSG msg; MSG msg;
HRESULT hres; HRESULT hres;
BOOL embedding = FALSE, nohome = FALSE, manager = FALSE; HANDLE context = INVALID_HANDLE_VALUE;
DWORD reg_cookie; DWORD reg_cookie, ret = 1;
ULONG_PTR context_cookie;
ACTCTXW actctx;
static const WCHAR embeddingW[] = {'-','e','m','b','e','d','d','i','n','g',0}; static const WCHAR embeddingW[] = {'-','e','m','b','e','d','d','i','n','g',0};
static const WCHAR nohomeW[] = {'-','n','o','h','o','m','e',0}; static const WCHAR nohomeW[] = {'-','n','o','h','o','m','e',0};
...@@ -1138,6 +1141,15 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow) ...@@ -1138,6 +1141,15 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
CoInitialize(NULL); CoInitialize(NULL);
memset(&actctx, 0, sizeof(actctx));
actctx.cbSize = sizeof(actctx);
actctx.hModule = ieframe_instance;
actctx.lpResourceName = MAKEINTRESOURCEW(123);
actctx.dwFlags = ACTCTX_FLAG_HMODULE_VALID | ACTCTX_FLAG_RESOURCE_NAME_VALID;
context = CreateActCtxW(&actctx);
if (context != INVALID_HANDLE_VALUE)
activated = ActivateActCtx(context, &context_cookie);
init_dde(); init_dde();
while (*cmdline) while (*cmdline)
...@@ -1173,17 +1185,13 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow) ...@@ -1173,17 +1185,13 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
if (FAILED(hres)) if (FAILED(hres))
{ {
ERR("failed to register CLSID_InternetExplorer%s: %08lx\n", manager ? "Manager" : "", hres); ERR("failed to register CLSID_InternetExplorer%s: %08lx\n", manager ? "Manager" : "", hres);
CoUninitialize(); goto done;
ExitProcess(1);
} }
if (!embedding) if (!embedding)
{ {
if(!create_ie_window(nohome, cmdline)) if(!create_ie_window(nohome, cmdline))
{ goto done;
CoUninitialize();
ExitProcess(1);
}
} }
/* run the message loop for this thread */ /* run the message loop for this thread */
...@@ -1196,8 +1204,11 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow) ...@@ -1196,8 +1204,11 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
CoRevokeClassObject(reg_cookie); CoRevokeClassObject(reg_cookie);
release_dde(); release_dde();
ret = 0;
done:
CoUninitialize(); CoUninitialize();
if (activated)
ExitProcess(0); DeactivateActCtx(0, context_cookie);
return 0; ReleaseActCtx(context);
ExitProcess(ret);
} }
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