Print Page | Close Window

LoadBitmapFromResource - how to work with PNG

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9154
Printed Date: 08 October 2024 at 10:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: LoadBitmapFromResource - how to work with PNG
Posted By: ijwelch
Subject: LoadBitmapFromResource - how to work with PNG
Date Posted: 19 December 2007 at 11:07pm
I'm attempting to use PNG resources. And it's not working:(

In creating the resource file I'm using
1000   CUSTOM   MyImage.png

The resource is there but is not being loaded by LoadBitmapFromResource function.

Maybe it shouldn't be CUSTOM type. Does anybody know?


/edit
I see that if I convert image to a 32bpp bitmap image and add resource as:
1000   BITMAP   MyImage.bmp
then everything works ok.

Can ImageManager allow load png from resource. I think if could specify resource type in LoadBitmapFromResource then should be pretty straightforward.




Replies:
Posted By: Oleg
Date Posted: 20 December 2007 at 1:35am
Hi,
click properties and replace "CUSTOM" to "PNG"


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ijwelch
Date Posted: 20 December 2007 at 11:14pm
Thanks Oleg,

I had no idea PNG was a valid resource type (I just use notepad and rc.exe to build).



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