Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - SetIcons for Gallery Controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetIcons for Gallery Controls

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


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Topic: SetIcons for Gallery Controls
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 18 May 2008 at 1:05pm
Hi,
Load Bitmap using
 
CXTPImageManagerIcon::LoadBitmapFromFile and put it to imagemanager
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
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.078 seconds.