Print Page | Close Window

does LoadAlphaIcon work?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2094
Printed Date: 07 November 2025 at 9:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: does LoadAlphaIcon work?
Posted By: chrisjohnson
Subject: does LoadAlphaIcon work?
Date 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?




Replies:
Posted By: Ark42
Date 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)


Posted By: chrisjohnson
Date 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!



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