Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Redcap

Pages: [1]
1
Graphics / Load from resource file
« on: July 22, 2011, 04:21:56 pm »
You're welcome.

Best of luck with your next attempt, hopefully it goes much smoother :)

EDIT:

While experimenting just now, I've found a (slightly odd) way to do this.

Instead of including it as a bitmap, try including it as RCDATA.

It will load it as data, instead of loading as a bmp resource, so it will retain the header information so it can be saved into a bmp  :)

Not 100% sure if this will help your situation, but it may at least offer an easy work around.

2
Graphics / Load from resource file
« on: July 22, 2011, 03:21:25 pm »
Ok, so what I found out about my Icon issues, also applies to your bitmap problems.


Quote
You cannot load a resource into your application and then write it to a file in this way, as an icon resource and an icon file are not exactly the same thing. The icon file contains header information which is not part of the actual resource, so what you get loaded into memory is not the complete file.


Hope this helps some if you're still stuck on this.

3
Graphics / Load from resource file
« on: July 22, 2011, 03:04:39 pm »
Hey Slotdev,

I've just had a similar issue while trying to create an Icon file from one in the resource/application.

My resulting "Icon" is 22 bytes smaller, I noticed though that it's the first 22 bytes which are missing.

Perhaps this explains why you are not getting 4D42 in the first two bytes, because the first 14 bytes are actually being missed, as apposed to the last 14.

I haven't found a solution yet, but will keep you updated if I find anything.

I realize this post is roughly a month old, so if you have found a way to fix the issue, please let me know.


Regards,
RC

Pages: [1]