![]() |
Alpha icons look bad in Disabled state |
Post Reply ![]() |
Author | |
Stephen12 ![]() Newbie ![]() Joined: 20 July 2005 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 20 July 2005 at 3:59pm |
Platform: XTpro 9.6, Win XP SP2, VS2003 Problem: I am trying to use alphablended icons from (.ICO) files. They work as expected in a normal state on Whidbey and Office2003, but they look bad when they are disabled (They have black pixels around them). I have bUseDisabledIcons = TRUE
What did I try? I took some of this icons and brought them into your CommandBarsIcon sample as a resource and set them for some of the MenuItems using SetIcon(nResouceID, nCommandID)
They look the same as in my app (bad - again, only when they are disabled) while alpha icons you have in that sample look good . I was going to compare colors and opacity of pixels, but I cannot open your alphaclr.bmp file with VS2003 resource editor (>256 colors), nor with your Designer Studio. I played also with SetMaskColor using black instead of your default green, but that didn't give me a desired result. I would appreciate any help on this. Thanks in advance |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Are you sure you have "alphablended" icons? Please attach one here to see.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Stephen12 ![]() Newbie ![]() Joined: 20 July 2005 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Thanks for the quick response! I've got to apologize. I found what the problem was and I didn't even post the problem right. Icons are alpha blended, however it was the way they were loaded that was causing the problem. I made a mistake when I was trying to put them in your CommandBarsIcon example to try with icon that I already processed with some tools and made them non-alpha (That is why bad look with SetIcon(resourceId, commandID I discovered that because when I tried some more that I was going to send you in reply they worked. But, they didn't work in my app because of the way of loading from file. I couldn't use resources so I opened them with LoadImage and passed the handle to your SetIcon: HICON hIcon = (HICON) LoadImage(NULL, sFilename, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE |LR_LOADFROMFILE); if(hIcon) XTPImageManager()->SetIcon(hIcon, ID_BLAHBLAH);
, while proper way was this: XTPImageManager()->SetIcon(CXTPImageManagerIconHandle(CXT PImageManagerIcon::LoadAlphaIcon(sFileName, 0)), ID_BLAHBLAH); Regards |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Right :)
|
|
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 |