Using A Small Icon With The Tab Label | CodeGuru

Using A Small Icon With The Tab Label

Environment: VC6 SP5 Usage The code to add small icon to the tab label should be placed in the constructor of CMyPropertySheet. CMyPropertySheet is derived from CPropertySheet. The object m_Page1 is defined in the header file: CMyPage m_Page1; CMyPage is derived from CPropertyPage. IDI_SMALL_ICON is ID number of the icon resource(small). CMyPropertySheet::CMyPropertySheet(CWnd* pWndParent) : CPropertySheet(IDS_PROPSHT_CAPTION, […]

Written By
CodeGuru Staff
CodeGuru Staff
Dec 7, 2001
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Environment: VC6 SP5

Usage

The code to add small icon to the tab label should be placed
in the constructor of CMyPropertySheet.

CMyPropertySheet is derived from CPropertySheet.

The object m_Page1 is defined in the header file:

CMyPage m_Page1;

CMyPage is derived from CPropertyPage.

IDI_SMALL_ICON is ID number of the icon resource(small).

CMyPropertySheet::CMyPropertySheet(CWnd* pWndParent)
: CPropertySheet(IDS_PROPSHT_CAPTION, pWndParent)
{
  m_Page1.m_psp.dwFlags |= PSP_USEHICON ;
  m_Page1.m_psp.hIcon = AfxGetApp() -> LoadIcon(IDI_SMALL_ICON);
  AddPage(&m_Page1);
}
CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.