Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPPropertyPageTreeNavigator Class
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyPageTreeNavigator Class

 Post Reply Post Reply
Author
Message
grace View Drop Down
Newbie
Newbie


Joined: 02 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote grace Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyPageTreeNavigator Class
    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?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
grace View Drop Down
Newbie
Newbie


Joined: 02 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote grace Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2008 at 11:26am
Spy++ has shown no differences......
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2008 at 1:21pm
Hello,
ok, show all related code.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
grace View Drop Down
Newbie
Newbie


Joined: 02 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote grace Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
grace View Drop Down
Newbie
Newbie


Joined: 02 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote grace Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2008 at 9:16am
Hi Oleg,
 
Still no luck.
 
Thank you for your help.  Here is the project
 
Back to Top
grace View Drop Down
Newbie
Newbie


Joined: 02 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote grace Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2008 at 11:18am
Thanks again Oleg,
 
 
I finally have this resolved.
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.