![]() |
Unable to display icon for item - Part 2 |
Post Reply ![]() |
Author | |
iron1103 ![]() Newbie ![]() Joined: 16 February 2007 Location: Taiwan Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 16 February 2007 at 7:05am |
![]() Here is my problem, when I use SetIcon() in this way, it works fine,
CXTPTaskPanelGroupItem *pItem;
CXTPImageManagerIconHandle hicon( AfxGetApp()->LoadIcon(IDI_ICON) );
m_TaskPanel.GetImageManager()->SetIcon( hicon, pItem->GetID() ); But in this way, it won't display the icon,
CXTPTaskPanelGroupItem *pItem;
HICON hicon = AfxGetApp()->LoadIcon(IDI_VEC);
HBITMAP hbmp = MyFunction( hicon );
CXTPImageManagerIconHandle xtpicon( hbmp );
m_TaskPanel.GetImageManager()->SetIcon( xtpicon, pItem->GetID() );
And I chased the source code,
CXTPImageManagerIcon::PreMultiplyAlphaBitmap()
{
TRY
{
hBitmapAlpha = CreateDIBSection(dcSrc, pBitmapInfo, DIB_RGB_COLORS, (void**)&pDest, NULL, 0);
}
}
I use CDC.BitBlt() to see the hBitmapAlpha, it's totally black.
Did I miss something ?? Please help me.
![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
If yo use CXTPImageManagerIconHandle xtpicon( hbmp ); ImageManager assumes that hbmp is 32bit alpha bitmap.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
iron1103 ![]() Newbie ![]() Joined: 16 February 2007 Location: Taiwan Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
oh.. it could be the answer..
thank you.. i will check my bitmap files
|
|
![]() |
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 |