Print Page | Close Window

CXTPPropertyPageTreeNavigator Class

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=10690
Printed Date: 26 June 2024 at 12:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyPageTreeNavigator Class
Posted By: grace
Subject: CXTPPropertyPageTreeNavigator Class
Date Posted: 19 May 2008 at 2:53pm

 

I am trying to implement an image list in the tree navigator.    I have created the image list, added the bitmaps and set the image list but when I reference the images in the insertitem statement.  All I get is a blank space where the image should be.  I have verified that the bitmaps will work in another tree.  Has anyone been successful with this?




Replies:
Posted By: Oleg
Date Posted: 20 May 2008 at 12:47am
Hi,
 
Check in Spy+ if your tree has same styles as test tree.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: grace
Date Posted: 20 May 2008 at 11:26am
Spy++ has shown no differences......


Posted By: Oleg
Date Posted: 20 May 2008 at 1:21pm
Hello,
ok, show all related code.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: grace
Date Posted: 20 May 2008 at 3:11pm
Using the CodeJock Property Sheet example:
 
In CreateTree() I added
 
CImageList m_ImageList;

CBitmap bmp;

m_ImageList.Create(16,16, ILC_COLOR32,1, 2 );

bmp.DeleteObject();

bmp.LoadBitmap( IDB_BITMAP1);

m_ImageList.Add( &bmp, RGB(0,0,0));

bmp.DeleteObject();

bmp.LoadBitmap( IDB_BITMAP2);

m_ImageList.Add( &bmp, RGB(0,0,0));

SetImageList(&m_ImageList, TVSIL_NORMAL);

HTREEITEM hItemGeneral = InsertItem( TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE,_T("General"),1,1,0,0,0,0,0);

I also created an insert structure for the insert item as well but that does not work either.


Posted By: Oleg
Date Posted: 21 May 2008 at 1:26am
I guess problem with Bitmaps.
 
You have ILC_COLOR32 but add them with black mask.
 
try to change it
m_ImageList.Add( &bmp, NULL); or use ILC_COLOR24|ILC_MASK
 
 
if it will not help attach whole changed project with bitmaps and code.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: grace
Date Posted: 21 May 2008 at 9:16am
Hi Oleg,
 
Still no luck.
 
Thank you for your help.  Here is the project
 
https://forum.codejock.com/uploads/20080521_091604_proptest.zip - uploads/20080521_091604_proptest.zip


Posted By: grace
Date Posted: 21 May 2008 at 11:18am
Thanks again Oleg,
 
 
I finally have this resolved.
 
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net