XP Look in HTML forms in AxSHDocVw.AxWebBrowser

N

Norm

I cannot get the Web Browser control to display XP style controls in
HTML forms. I have tried adding manifest files in many ways with no
luck.

Is this possible? Can the Web Browser control show XP style controls
in HTML forms?



Here is what I have tried...

I created a very simple application in .NET 2003 called testhtml. I
added the "Microsoft Web Browser" COM object the toolbox, dragged out
the control onto the form (it automatically added references to
SHDocVW and AxSHDocVw to the project) and then simply added
"this->axWebBrowser1->Navigate("c:/test.html");

The c:/test.html contains a simple form with a couple of buttons.

I ran the app: and as expected: No XP Look Buttons in Forms

I then added testhtml.exe.manifest to the directory of the program and
still no XP look buttons.

I then added:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST
"testhtml.exe.manifest"
Still no XP Look

Then...
ISOLATION_AWARE_ENABLED to the preprocessor definitions
and added
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST
"testhtml.exe.manifest"

And even

ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID RT_MANIFEST
"testhtml.exe.manifest"

Here is the manifest I am using:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="TestHtml"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

Thanks,

Norm Ross
 
N

Norm

I cannot get the Web Browser control to display XP style controls in
HTML forms. I have tried adding manifest files in many ways with no
luck.

Is this possible? Can the Web Browser control show XP style controls
in HTML forms?

Ok, I was on a wild goose chase with the manifest files...

The answer is:

implement

IDocHostUIHandler::GetHostInfo and set dwFlags = DOCHOSTUIFLAG_THEME

Norm
 
T

Tom Krueger [MSFT]

If you have control of the html being rendered a simple way to get themeing
to work in your Microsoft Browser Control is to add the meta tag as shown
below.

<html>

<head>

<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes" />

</head>

<body>



<input type="button" value="Test" />



</body>

</html>





Tom Krueger



Smart Client DevCenter - http://msdn.microsoft.com/smartclient/
Mobile DevCenter - http://msdn.microsoft.com/smartclient/



This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top