MFC Learning Note 3---Make dialog style and system unified

Source: Internet
Author: User

One thing that depressed me for a long time, in the Edit dialog box in VS or click the Preview is the Win7 style of the button and dialog box:

Click the Test dialog box:

However, the resulting application is this:

So people are very uncomfortable ah, button style back to the version of N years ago, retro version AH has wood

The solution I found online is as follows:

First in the Res directory to build a text file, named Windows.manifest suffix:. manifest

Then open it with Notepad and put the following code:

<?xml version= "1.0" encoding= "UTF-8" standalone= "yes"?>

<assembly xmlns= "urn:schemas-microsoft-com:asm.v1" manifestversion= "1.0" >

<assemblyidentity

Name= "Microsoft.Windows.XXXX"

Processorarchitecture= "x86"

version= "5.1.0.0"

Type= "Win32"/>

<description>windows shell</description>

<dependency>

<dependentAssembly>

<assemblyidentity

Type= "Win32"

Name= "Microsoft.windows.common-controls"

version= "6.0.0.0"

Processorarchitecture= "x86"

Publickeytoken= "6595B64144CCF1DF"

Language= "*"

/>

</dependentAssembly>

</dependency>

</assembly>

Then save.

Then import the resources and add the file Windows.manifest to the project's resources:

Insert, resource, import, file type to all files, locate the Windows.manifest-> Pop-up dialog box

After the resource type is filled in, OK.

Recompile the link, the dialog effect has changed.

MFC Learning Note 3---Make dialog style and system unified

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.