Win32 API: Create button with Aero effect

Viewed 430

I can create button with CreateWindow function like

    CreateWindow(L"BUTTON", "Button label", WS_VISIBLE | WS_CHILD, 0, 0, 100, 25, parentWnd, ID, NULL, NULL);

It works perfect, but button has no glossy effects, font has no anti-aliasing.

I also compiled manifest:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
                        processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
    </dependentAssembly>
  </dependency>
</assembly>

Not sure, which token I must use, I got sample from some site. Then, I created resource list:

   CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "manifest.xml"

Compiled with:

   i686-w64-mingw32-windres -i resources.txt -OCOFF resources.res

And finally linked with resources.res, but with no any result.

When I created manifest and place it near my exe file - all works fine. But when I try to compile manifest into resources, I have no effect.

How to fix it? I prefer not to use any libs, especially large as Qt.

1 Answers
Related