views:

605

answers:

3

I have an ActiveX control in IE (7). When it shows a dialog box, the dialog box is not showing in XP visual style. I have tried embedding manifests to no avail. Anybody got any idea? by the way, the dialog boxes were implemented using wtl.

A: 

You might want to try Skinning a WTL dialog over on Code Project.

boost
+3  A: 

Build your dll with #define ISOLATION_AWARE_ENABLED 1. Or put compiler directive /D ISOLATION_AWARE_ENABLED=1. Don't forget manifest should be embedded with id 2.

More info here: http://msdn.microsoft.com/en-us/library/aa815321%28VS.85%29.aspx#_slate_set_the_isolation_aware_enabled_directive

BTW, dialog shown from ActiveX built with these settings will be skinned even if that ActiveX is embedded into executable built without manifest.

A: 

I think this happens as a result of the fact that IE is reading the control exposed through COM while .NET uses it's own apprach where it reads from a manifest file.

Try calling Application.EnableVisualStyles before the form loads. That worked for me.

Matt