(API) applying current visual style to window

Blitz3D Forums/Blitz3D Programming/(API) applying current visual style to window

bytecode77(Posted 2008) [#1]
hi!
i wondered that all the gadgets in a window (either winblitz3d or blitzplus) have no visual styles. is it somehow possible to apply the current visual style to the window?
i don't mean applying a custom visual style, but just enabling the gadgets to have the windows current visual style.

some API guys around having an idea?
thanks ;D


JoeGr(Posted 2008) [#2]
You can use a manifest file. Create a new text file in the same directory as your compiled program, copy and paste the text below to it and save. Then change the filename to "MyExe.exe.manifest", replacing "MyExe" with the name of your executable.

<?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="MyCompany.MyLabel.MyAppName"
type="win32"
/>
<description>MyDescription</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>


John Blackledge(Posted 2008) [#3]
This produces nonborder toolbar buttons, but makes listview icons disappear when selected.


JoeGr(Posted 2008) [#4]
Yes, you do tend to run into a few display problems using this method. If you're working with WinBlitz3D some of these can probably be fixed by mucking about with the styles of individual gadgets using WinAPI constants. Also, odd things like whether a gadget is placed on a panel or directly onto a form can make a difference.

No disrespect to Kev but I switched recently to using Visual C# Express with the Blitz3D SDK for apps and its much easier to get professional-looking results.


bytecode77(Posted 2008) [#5]
sry that i reply so late. i think i've forgotten about this threat.
this manifest works with B+ and i'm using it.
thank you:)

edit: even works when i use this manifest on blitzcc.exe so i can use it on quick compilation, too!
edit2: will this work with vista, too?