Using A Small Icon With The Tab Label

Environment: VC6 SP5


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);


More by Author

Must Read