Print Page | Close Window

Alpha Icons In Trees and Reports

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=5840
Printed Date: 07 February 2025 at 2:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Alpha Icons In Trees and Reports
Posted By: danpetitt
Subject: Alpha Icons In Trees and Reports
Date Posted: 19 December 2006 at 3:35pm
I cant find any example code in attaching alpha bitmaps to an imagelist that i can use in a Tree or Report control.
 
Oleg, could you give me a some simple steps for me ... thanks so much. 



Replies:
Posted By: danpetitt
Date Posted: 19 December 2006 at 6:12pm
Actually I got it now thanks.


Posted By: Italo
Date Posted: 19 December 2006 at 7:46pm
Can you please share this with the rest of us?
 
Thanks,
Italo


Posted By: danpetitt
Date Posted: 22 December 2006 at 7:09pm

 BOOL bAlpha = FALSE;
HBITMAP hb = CXTPImageManagerIcon::LoadBitmapFromResource( _T("IDB_WEBSITE_TREE"), &bAlpha );

CBitmap bitmap;
bitmap.Attach( hb );

m_ilProjectTree.Create( 16, 16, ILC_COLOR32, 1, 1 );
m_ilProjectTree.Add( &bitmap, &bitmap );
m_ctlProjectTree.SetImageList( &m_ilProjectTree, TVSIL_NORMAL );

Or you can use LoadBitmapFromFile to do a similar thing
 
If you want to use a resource, then modify your .rc2 file and add
IDB_WEBSITE_TREE as a PNG resource like:
IDB_WEBSITE_TREE      PNG   MOVEABLE PURE   "res\\ProjectTreeIcons.png"
 



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