Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - LoadBitmapFromResource - how to work with PNG
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

LoadBitmapFromResource - how to work with PNG

 Post Reply Post Reply
Author
Message
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Topic: LoadBitmapFromResource - how to work with PNG
    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.

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: 20 December 2007 at 1:35am
Hi,
click properties and replace "CUSTOM" to "PNG"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post 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).
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.141 seconds.