Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Alpha Icons In Trees and Reports
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Alpha Icons In Trees and Reports

 Post Reply Post Reply
Author
Message
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Topic: Alpha Icons In Trees and Reports
    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. 
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2006 at 6:12pm
Actually I got it now thanks.
Back to Top
Italo View Drop Down
Groupie
Groupie


Joined: 10 December 2003
Location: United States
Status: Offline
Points: 83
Post Options Post Options   Thanks (0) Thanks(0)   Quote Italo Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2006 at 7:46pm
Can you please share this with the rest of us?
 
Thanks,
Italo
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post 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"
 
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.047 seconds.