![]() |
Gallery items not showing |
Post Reply
|
| Author | |
BastianPL
Groupie
Joined: 15 April 2006 Status: Offline Points: 69 |
Post Options
Thanks(0)
Quote Reply
Topic: Gallery items not showingPosted: 16 April 2007 at 3:54pm |
|
Hi,
Anybody can tell me why images are not showing in gallery ???
Code 1 : -> Onlyone bitmap to show -> doesnt work m_pDatabases = CXTPControlGalleryItems::CreateItems( pCommandBars, ID_GALLERY_DATABASE ); ASSERT( m_pDatabases != NULL ); m_pDatabases->GetImageManager()->SetMaskColor(RGB(255,0,255));m_pDatabases->GetImageManager()->SetIcons(IDB_FLAG_ENGLAND, 0, 0, CSize(32, 32)); //m_pItems->SetItemSize(CSize(56, 56)); m_pDatabases->AddItem(0, 0); Code 2) Loading images to imagelist -> doesnt work
UINT uiFlags[]= { IDB_FLAG_UNITED_KINGDOM,
IDB_FLAG_ENGLAND, IDB_FLAG_SCOTLAND, IDB_FLAG_WALES, IDB_FLAG_NORTHERN_IRELAND, IDB_FLAG_EUROPEAN_UNION, IDB_FLAG_UNITED_STATES_OF_AMERICA, IDB_FLAG_CANADA, IDB_FLAG_AUSTRALIA, IDB_FLAG_NEW_ZEALAND, -1 }; m_pItemsDatabase->GetImageManager()->SetMaskColor(RGB(255,0,255)); CImageList img; img.Create(48,48,ILC_COLOR32 | ILC_MASK, 0,1); for (int i = 0; i < _countof(uiFlags); i++) { CBitmap bmp; bmp.LoadBitmap(uiFlags[i]); img.Add(&bmp, RGB(255,0,255)); bmp.DeleteObject(); } m_pItemsDatabase->GetImageManager()->SetIcons(img, 0, 0, CSize(48, 48)); m_pItemsDatabase->SetItemSize(CSize(56, 56)); for (int nStyle = 0; nStyle < _countof(uiFlags); nStyle++) { CXTPControlGalleryItem* pItem = m_pItemsDatabase->AddItem(nStyle, nStyle); } Do anybody know the solution ? |
|
|
Bastian
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 April 2007 at 12:39am |
|
Hi,
try instead ILC_COLOR32 use ILC_COLOR24 if you have masked bitmaps.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |