Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Alpha icon from image manager?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Alpha icon from image manager?

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Alpha icon from image manager?
    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!
}
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2009 at 6:15am
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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2009 at 6:35am
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...)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.