Print Page | Close Window

Unable to display icon for item - Part 2

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=6441
Printed Date: 14 May 2024 at 5:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Unable to display icon for item - Part 2
Posted By: iron1103
Subject: Unable to display icon for item - Part 2
Date Posted: 16 February 2007 at 7:05am
 Hi,
 
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.
 
 
 Happy Chinese New Year !!



Replies:
Posted By: Oleg
Date Posted: 16 February 2007 at 9:12am
Hi,
If yo use CXTPImageManagerIconHandle xtpicon( hbmp ); ImageManager assumes that hbmp  is 32bit alpha bitmap.


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


Posted By: iron1103
Date Posted: 18 February 2007 at 12:31pm
oh..  it could be the answer..
 
thank you..  i will check my bitmap files



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