With effect from version 11.0 of Adelia Studio, you can compile your Visual Adelia applications in Unicode. This enables support for Windows themes (e.g. the XP theme or the Vista theme) in generated applications.
The Windows theme engine changes the appearance of windows and graphic controls, generally by applying either a gradient background or an image rather than a plain background. For example, tabs and buttons are normally drawn using an image.
Adelia Studio now supports themes, which means that the appearance of your applications' windows will vary according to the selected theme.
Theme support limitations
The use of themes is subject to a number of limitations relating to the object properties that can be used to customize the appearance:
- Although you can set certain properties such as the font, the theme is taken into consideration when a control is drawn, which means that the font you specified may or may not be used. For example, the text in a frame is systematically displayed in blue in the standard Windows XP theme, whatever color you may have selected.
- Changing the text or background colors or the text style may or may not give a satisfactory result, depending, for example whether a dark or a light window background is used. For example, if you assign a blue background to a frame, the text will not be readable with the standard theme.
The most obvious problem occurs if you change a control's background color: the display contrast may vary, depending on the theme; in addition, a uniform background is not consistent with a background image in a control with tabs.
Adelia features a setting that lets you combine the selected background color with the window background, which can improve the appearance with some themes by making the background image transparently visible and by enhancing the contrast:
Example:
|
|
The same window with the Windows Classic theme
Note the following limitation of Windows themes: multi-line tab controls are poorly supported, as are tabs placed vertically or at the bottom of the window. Although Adelia Studio is able to render such controls (and the results obtained with the tested themes are satisfactory), certain themes may potentially cause tabs to be displayed incorrectly. As a rule, it is better to use tabs arranged along a single line at the top of the window.
Enabling support for Windows themes
Support for Windows themes is enabled by forcing the use of version 6 of Common Controls (comctrl32.dll) in the application's manifest. Adelia is supplied with two sample manifests (themes.manifest and no_themes.manifest) as standard. If you want support for themes to be enabled directly when new programs are compiled, simply copy the desired "themes.manifest" file to the Adelia directory, renaming it "unicode.manifest", or else manually copy it to the same directory as "myexe.exe", renaming it "myexe.exe.manifest". Where applicable, this file will replace the file produced by the compiler.
Note: Version 6 of Common Controls (comctrl32.dll) is not compatible with Ansi applications; this operation should only be performed for Adelia programs compiled in Unicode.
Common Controls v6 is enabled by adding the following declarations to the manifest:
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' />
</dependentAssembly>
</dependency>