![]() |
Alpha icon from image manager? |
Post Reply ![]() |
Author | |
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() Posted: 13 December 2009 at 12:07pm |
How do I create an alpha HICON from XTPImageManager()? This yields an ugly (no alpha) icon:
CXTPImageManagerIcon *pIcon = XTPImageManager()->GetImage(ID_ICON, 32);
if (pIcon)
{
CXTPImageManagerIconHandle iconHandle = pIcon->GetIcon();
iconCopy.CopyHandle(iconHandle);
iconCopy = CXTPTransparentBitmap(iconCopy.GetBitmap()).ConvertToIcon(); // Alpha is lost!
}
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You can put it to CImageList with COLOR_32 mode and extract as icon. But it will work in WindowsXP+
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Good idea. However, I solved it by making my own function. Quite tricky...
I'd expect XTP to provide such a function. (If I recall correctly, in previous versions you simply called GetIcon...)
|
|
![]() |
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 |