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
#include "wine/wine_common_ver.rc"
/* @makedep: ieframe.manifest */
123 RT_MANIFEST ieframe.manifest
/* @makedep: ietoolbar.bmp */
IDB_IETOOLBAR BITMAP ietoolbar.bmp
......
......@@ -1125,10 +1125,13 @@ static void release_dde(void)
*/
DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
{
BOOL embedding = FALSE, nohome = FALSE, manager = FALSE, activated = FALSE;
MSG msg;
HRESULT hres;
BOOL embedding = FALSE, nohome = FALSE, manager = FALSE;
DWORD reg_cookie;
HANDLE context = INVALID_HANDLE_VALUE;
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 nohomeW[] = {'-','n','o','h','o','m','e',0};
......@@ -1138,6 +1141,15 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
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();
while (*cmdline)
......@@ -1173,17 +1185,13 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
if (FAILED(hres))
{
ERR("failed to register CLSID_InternetExplorer%s: %08lx\n", manager ? "Manager" : "", hres);
CoUninitialize();
ExitProcess(1);
goto done;
}
if (!embedding)
{
if(!create_ie_window(nohome, cmdline))
{
CoUninitialize();
ExitProcess(1);
}
goto done;
}
/* run the message loop for this thread */
......@@ -1196,8 +1204,11 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
CoRevokeClassObject(reg_cookie);
release_dde();
ret = 0;
done:
CoUninitialize();
ExitProcess(0);
return 0;
if (activated)
DeactivateActCtx(0, context_cookie);
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