Add Item to gallery at run-time |
Post Reply |
Author | |
Bart6
Groupie Joined: 22 March 2009 Location: Belgium Status: Offline Points: 20 |
Post Options
Thanks(0)
Posted: 22 March 2009 at 8:17am |
Hello,
I would like to add an item to a gallery at run-time. Via an event I get a pointer to a thumbnail structure. The structure contain size and memory pointer to 32 bit RGBA uncompressed image.
Q: What is the best way to add my thumbnail to the gallery? (of type CXTPControlGalleryItems)
(Using XTP 13.0.0 on XP SP3 32bit and VS2008)
Thank you
Bart
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Add Item to gellery items and update imagemanager:
m_pItemsColumns->GetImageManager()->SetIcons(&bmp....);
m_pItemsColumns->AddItem(_T("One"), index, index); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Bart6
Groupie Joined: 22 March 2009 Location: Belgium Status: Offline Points: 20 |
Post Options
Thanks(0)
|
Thanks Oleg.
Here is how I added a new item to the existing gallery:
CXTPImageManagerIconHandle hIcon(hBitmap); UINT index = m_pItemsMaterials->GetImageManager()->AddCustomIcon(hIcon);
m_pItemsMaterials->AddItem( TEXT( "Hello World"), index);Would you agree this is the best method? |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |