The VC ++ 6.0 program uses the XP style

Source: Internet
Author: User
1. Implementation principle:

Microsoft provides Themes Service for Windows XP. Themes can make the program "XP style" and look more beautiful, because Microsoft has updated the "XP style" Control of comctl32.dll (ver 6.0. 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 )".
2>In the displayed "insert resource" dialog box, select "Custom M" 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 ID to 1.
4>Double-click the modified "1" entry and enter the following code in the editor window on the right:

 

Code <? 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 recompile it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.