Two interfaces: Help. How to remove the classic display? I only need to use Windows 7. Thank you (solution attached)

Source: Internet
Author: User

The problem has been solved, and today it is a bit crazy.

 

The reason is as follows:

 

 

If you want to modify the existing project, you need to use the comparison tool to integrate the following code. The solution is as follows:

 

1. Add the following content to the initialization function initinstance () of the cxxxapp class, such as cmfcapplication1app.

 

Write the following before cwinappex: initinstance:

// If an Application List running on Windows XP specifies that you want to use comctl32.dll version 6 or later to enable visualization, // you need initcommoncontrolsex (). Otherwise, a window cannot be created. Initcommoncontrolsex initctrls; initctrls. dwsize = sizeof (initctrls); // set it to include all the // public control classes to be used in the application. Initctrls. dwicc = icc_win95_classes; initcommoncontrolsex (& initctrls );

Then in:

CWinAppEx::InitInstance();// Initialize OLE librariesif (!AfxOleInit()){AfxMessageBox(IDP_OLE_INIT_FAILED);return FALSE;}

Then, add the following sentence:

AfxEnableControlContainer();

 

2. Modify the header file: stdafx. H. Add this section:

# Include <afxdisp. h> // MFC automation class
#ifdef _UNICODE#if defined _M_IX86#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")#elif defined _M_X64#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")#else#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")#endif#endif

Get it done!

 

The problem is described as follows:

Windows 7:

Windows classic:

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.