Use the XP style on the VC ++ 6 Interface
There are a lot of articles in English. Chinese search is not very good, so I would like to introduce it specially.
1. Implementation Principle
Microsoft is a Windows
XP provides the Themes Service. Themes enables the program to have an "XP style" and looks more beautiful, because Microsoft has updated comctl32.dll (ver
6.0) This "XP style" control. Microsoft also reserved comctl32.dll v5.8 to retain the traditional Windows interface style. Vc6 was launched earlier than WINXP, so the "XP style" is not used by default for vc6 programs.
The XP style is mainly built in manifest. Therefore, you only need to include the vc6 program. It can be external or built-in as a resource.
2. Implementation Method:
1. Open your vc6 project, find the resource attempt (resourceview), right-click the root node of the tree in the view, and select "insert" from the menu )".
2. In the displayed "insert resource" dialog box, select "Custom" and enter 24 in the new dialog box ("New Custom Resource. Because the manifest type is 24, click "OK.
3. In the resource view tree, right-click the entry "ddr_default1" under 24 and select "properties" to change the ID to 1.
4. Double-click the modified "1" entry and enter the following code in the editor window on the right:
- <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"?>
- <Assembly
- Xmlns = "urn: Schemas-Microsoft-com: ASM. V1"
- Manifestversion = "1.0">
- <Assemblyidentity
- Processorarchitecture = "x86"
- Version = "5.1.0.0"
- Type = "Win32"
- Name = "test.exe"/>
- <Description> test application </description>
- <Dependency>
- <Dependentassembly>
- <Assemblyidentity
- Type = "Win32"
- Name = "Microsoft. Windows. Common-Controls"
- Version = "6.0.0.0"
- Publickeytoken = "6595b64144ccf1df"
- Language = "*"
- Processorarchitecture = "x86"/>
- </Dependentassembly>
- </Dependency>
- </Assembly>
5. Save the project and re-compile it.
Appendix. Comparison diagram: