Print Page | Close Window

SetIcons for Gallery Controls

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=10666
Printed Date: 15 November 2025 at 1:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SetIcons for Gallery Controls
Posted By: terrym
Subject: SetIcons for Gallery Controls
Date Posted: 18 May 2008 at 9:52am
We have some gallery controls and we want to load images directly from disk for the items, these are png's as we want the alpha channel and we want to load each icon from disk for each image that will be displayed.
 
We have tried CImageList without look, any ideas and an example if possible
 
How would we do this please?
 
Thanks
Terry
 


-------------
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey



Replies:
Posted By: Oleg
Date Posted: 18 May 2008 at 1:05pm
Hi,
Load Bitmap using
 
CXTPImageManagerIcon::LoadBitmapFromFile and put it to imagemanager


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


Posted By: terrym
Date Posted: 18 May 2008 at 2:14pm
Hi
 
cheers we imlemented with:
 

m_ImageList.Add( pBitmap, (CBitmap *)NULL );

and pBitmap is a CBitmap object created from our HBITMAP we had using CBitmap *pBitmap = CBitmap::FromHandle( hBitmap );

Cheers
Terry
 


-------------
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey


Posted By: Oleg
Date Posted: 19 May 2008 at 1:14am
Hi,
its not good.
Forget about CImageList :) use our CXTPImageManager. ImageList support Alpha icons only in WindowsXP. ImageManager even in win95.


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


Posted By: terrym
Date Posted: 19 May 2008 at 4:53am
I assume CXTPImageManager also accepts either CBitmap or HBITMAP objects???

-------------
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey


Posted By: terrym
Date Posted: 19 May 2008 at 11:27am

Can you tell me how to convert below to use CXTPImageManager please:

m_ImageGalleryImageList.Create( 96, 96, ILC_COLOR32 | ILC_MASK, 0, 1 );

HBITMAP hBitmap = ...Our Bitmap...

CBitmap *pBitmap = CBitmap::FromHandle( hBitmap );
m_ImageGalleryImageList.Add( pBitmap, (CBitmap *)NULL );
m_pImageItems
->GetImageManager()->SetIcons( m_ImageGalleryImageList, 0, 0, CSize( 96, 96 ) );
 
Cheers
Terry


-------------
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey



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