VC ++/mfc program icon change method and program title modification is super simple

Source: Internet
Author: User

1. To replace icons, you must use the next tool to create icons. I think iconcool studio is the best. Create several types of icons at a time:

Http://iconcool-studio.softonic.cn/

Production

2. Save the icon as iconc. ICO.

3. Create an MFC project -- iconchange, path -- D: \ qt_proj \ iconchange

4. Copy the ICO file to D: \ qt_proj \ iconchange \ res.

5. Open the iconchange. RC file in VC:

6. modify the code here:

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)LANGUAGE 9, 1IDR_MAINFRAME           ICON         "res\\IconC.ico"IDR_IconChangeTYPE         ICON         "res\\IconChangeDoc.ico"#endif

The icon corresponding to the previous idr_mainframe is iconchange. ICO.

7. Rebuild the entire project. The modification is successful under D: \ qt_proj \ iconchange \ debug.

 

It's easy to modify the program title:

1. Open the Class View, and then click the cxxxdoc class. For example, if my class is csalerecorddoc, right-click to open properties.

2. Reload the settitle function in "overrides", for example:

void CSaleRecordDoc::SetTitle(LPCTSTR lpszTitle){    // TODO: Add your specialized code here and/or call the base class    CString str = "Db Pro";    CDocument::SetTitle(str);}

 

 

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.