Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - does LoadAlphaIcon work?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

does LoadAlphaIcon work?

 Post Reply Post Reply
Author
Message
chrisjohnson View Drop Down
Newbie
Newbie


Joined: 28 March 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisjohnson Quote  Post ReplyReply Direct Link To This Post Topic: does LoadAlphaIcon work?
    Posted: 07 April 2005 at 3:16pm
I'm trying to create toolbars on the fly, by loading the button images from .ico files.

In my CMainFrame I am using the following to load the icon:
HBITMAP hBmp = CXTPImageManagerIcon::LoadAlphaIcon("G:\\icon17.ico",32);

The icon file has a single 32x32 16Million colour icon (I've also tried with 256 colour icons and icon files with multiple icons).

hBmp always ends up NULL. I can load the icon using LoadImage. I only have the demo version right now, so I can't see what is going on in the code.

Any ideas?

Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2005 at 10:21pm

Wouldn't Alpha mean you should be using 32bit (not 24bit, if thats what you mean by 16M color)
Back to Top
chrisjohnson View Drop Down
Newbie
Newbie


Joined: 28 March 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisjohnson Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2005 at 2:32am
That might be it.  I didn't know Alpha icons have to be 32bit.

I'll see if I can find a 32bit icon I can test it out with.

Thanks!
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.047 seconds.