Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Is there a way to set icons on tabs of a CExtResizablePropertySheet ? Collapse All
Subject Author Date
Vincent SAFFRE Mar 7, 2017 - 6:01 AM

Hello,



I a trying to add icons on the tab control of my CExtResizablePropertySheet using the same code as a CPropertySheet but it doesn’t work;



To set icons on the tab control of a CPropertySheet, I used to do this:



//Instanciate a CImageList with several icons

CImageList m_oImagesTab;

m_oImagesTab.Create(16, 16, ILC_COLORDDB | ILC_MASK, 5, 0);

m_oImagesTab.Add(AfxGetApp()->LoadIcon(IDI_KO));

m_oImagesTab.Add(AfxGetApp()->LoadIcon(IDI_OK));


//Set icon on OnInitDialog

BOOL CMyPropertySheet::OnInitDialog()

{

    PARENT_CLASS::OnInitDialog();  


    int iPage1 = 0;

    SetPageIcone(iPage1 );

 

    return TRUE;

}



void CMyPropertySheet::SetPageIcone(int p_iNumPage)

{

    CTabCtrl * pTabCtrl = PARENT_CLASS::GetTabControl();

    pTabCtrl->SetImageList(&m_oImagesTab);



    TC_ITEM tcItem;

    tcItem.mask = TCIF_IMAGE;

    tcItem.iImage = 0;                                                                            // Set icon index from CImageList

    pTabCtrl->SetItem(p_iNumPage /*nNumPage*/, &tcItem);    // Apply icon   

}



This code doesn’t work for CExtResizablePropertySheet  and I can’t find a sample of a CExtResizablePropertySheet with icons on tabs.

Can someone help?

TSELLC Support Jul 17, 2017 - 7:43 AM

This was answered in a separate email.

TSELLC_Support

Vincent SAFFRE Mar 7, 2017 - 7:45 AM

I’m working an Prof-UIS v3300