views:

34

answers:

1

I have written a Word add-in in C++ using plain Win32 API. It opens some dialogs but these are always shown without commctl6 visual styles on Vista+. The manifest is in place as RT_MANIFEST and resource ID - 2 (as shown below). When I invoke the same functionality/dialogs from my own test app, visual styles are OK.

Any idea how Word is preventing my add-in from using visual styles despite the manifest?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>
+1  A: 

Are you using ISOLATION_AWARE_ENABLED?

Alex K.
You hit the nail on the head! :-) I've known about this but I would have never remembered it on my own. It works beautifully. Thanks a lot!
wpfwannabe