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, pWndParent)
{
  m_Page1.m_psp.dwFlags |= PSP_USEHICON ;
  m_Page1.m_psp.hIcon = AfxGetApp() -> LoadIcon(IDI_SMALL_ICON);

  AddPage(&m_Page1);
}


Comments

  • yesyes...but in 32bits color?

    Posted by Legacy on 10/03/2003 12:00am

    Originally posted by: vv

    mmm...any idea is welcome

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Protecting business operations means shifting the priorities around availability from disaster recovery to business continuity. Enterprises are shifting their focus from recovery from a disaster to preventing the disaster in the first place. With this change in mindset, disaster recovery is no longer the first line of defense; the organizations with a smarter business continuity practice are less impacted when disasters strike. This SmartSelect will provide insight to help guide your enterprise toward better …

  • Live Event Date: August 14, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Data protection has long been considered "overhead" by many organizations in the past, many chalking it up to an insurance policy or an extended warranty you may never use. The realities of today makes data protection a must-have, as we live in a data-driven society -- the digital assets we create, share, and collaborate with others on must be managed and protected for many purposes. Check out this upcoming eSeminar and join Seagate Cloud …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds