CXTPPropertySheet bitmap |
Post Reply |
Author | |
guiuser1
Groupie Joined: 17 November 2015 Status: Offline Points: 34 |
Post Options
Thanks(0)
Posted: 01 December 2015 at 4:05pm |
We're looking at using the CXTPPropertySheet for our app settings. We something similar to the
example under \PropertySheet\ specifically like the CXTPPropertySheet ps(_T("CXTPPropertyPageTreeNavigator Sample")); We currently have a custom set of classes that manage this and inherently use the CPropertyPage classes and display images for each property page via the m_psp. Works great.... We're trying to retain this functionality and port our existing code to the ToolKit Pro CXTPPropertySheet classes....but can't find anyway to retain the images for each page. It should be similar to: pageProperties.m_psp.dwFlags |= ( PSP_USEHICON ); HICON hIconTab = AfxGetApp()->LoadIcon( IDI_PRINTER ); pageProperties.m_psp.hIcon = hIconTab; But ToolKitPro ignores the m_psp with respect to image displays...and thus does not display it. Has anybody touched this area? Not sure why this is not a standard method...seems like many apps require this type of support. |
|
guiuser1
Groupie Joined: 17 November 2015 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
OK...so after some hacking...we figured it out. We still feel this should be an inherent part of the PropertySheets but at least we have it working.
Here's a code snippet from the PropertySheets Example (unrefined): class CCategoriesTreeNavigator : public CXTPPropertyPageTreeNavigator { public: CImageList m_imageList; CCategoriesTreeNavigator() : CXTPPropertyPageTreeNavigator(TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT) { } BOOL CreateTree() { ASSERT(m_pSheet->GetPageCount() == 2); if (m_pSheet->GetPageCount() != 2) return FALSE; CBitmap bitmap; bitmap.LoadBitmap(IDI_PRINTER); m_imageList.Create(24, 24, ILC_COLOR24|ILC_MASK, 2, 1); m_imageList.Add(&bitmap, RGB(255,0,255)); SetImageList(&m_imageList, TVSIL_NORMAL); HTREEITEM hItemGeneral = InsertItem(_T("General"), 0, 0); HTREEITEM hItemOptions = InsertItem(_T("Options"), 1, 1); CTreeCtrl is a bit of pain to work with...we tried various other ways to plug in the image which only resulted in the 'blank' space where the image would appear but at least it showed that the control was trying to display something. The TreeCtrl example hinted at what need to be done... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |