Skip to main content

Problem:

Changing Dialog System application screensets to properly show the Visual Style layout on Windows XP.

The Adobe Acrobat file and .zip file attached to this document contain the full Knowledge Base document containing the explanatory screen prints and the example application to show how to accomplish the modernization.  Please download them to view the full information.

Resolution:

For the past 10 years, GUI Dialog System screensets have looked more or less like the following screen shot:

This screen shot was made on a Windows XP PC using the classic layout.

Switching the XP operating system to the new XP style layout without any change in the Dialog System screenset will result in:

which may look like XP on the first view. But only the title bar has got an XP style layout.  The rest of the features are still the classic style.

This article describes how to get a full Visual Style layout on windows XP for Dialog System screensets.

Where:

"

The push button has round edges

"

The tab control has colorized flaps

"

The group box blue texts and round edges

"

The radio button and the check box is marked in green

"

A mouse over (not shown here in the screen shot) on a push button, radio button, or check box will be visualized by an orange border

"

Etc ...

All these visual effect can be enabled, simply by adding a resource file to the program's executable. Therefore, this is accomplished without any change in the Dialog System screenset.  Select this link to download the files necessary to duplicate this example, including the resource and manifest files.

Enabling the XP style layout

1.

Place the following lines in a resource file .rc

#ifndef RT_MANIFEST

#define RT_MANIFEST 24

#endif

#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID

#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1

#endif

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "BOB.EXE.MANIFEST"

2.

Name the resource file like your executable, e.g. MyProgram.rc, if the executable is MyProgram.exe

3.

Place the following lines in a manifest file named BOB.EXE.MANIFEST, like written in the resource file. Be careful when changing the manifest file.

<?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="Application Name Goes Here"

   type="win32" />

   <description>Add your application description here.</description>

   <dependency>

   <dependentAssembly>

   <assemblyIdentity

         type="win32"

         name="Microsoft.Windows.Common-Controls"

         version="6.0.0.0"

         publicKeyToken="6595b64144ccf1df"

         language="*"

         processorArchitecture="x86"/>

    </dependentAssembly>

   </dependency>

</assembly>

4.

Add the .rc file to the project

5.

Drag the .rc file on the EXE

6.

Compile the .rc file either by a rebuild all or by a right-click on the .rc file selecting compile and a rebuild of the exe.

After these steps are finished, the program will show XP Visual Style on Windows operating systems enabled for XP layout

It will NOT show the XP style at construction time of the screenset, because the executable containing the .rc and the manifest file is not running.

For more detailed information, see also at Microsoft:

Using Windows XP Visual Styles

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp

Attachments:

XP-style.pdf

Old KB# 3761