May 26, 2024, 12:08:41 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Viewing Resources

Started by Brian, February 01, 2014, 10:12:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hi,

Just wondering here. If you have an exe that has images included as resources,
is it possible to view those images somehow while the program is actually running?

I've just downloaded Resource Hacker, and that can see the images inside my own
exe, so it must be possible

Brian

LarryMc

does Resource Hacker solve your problem or are you wanting to view resources from another exe from inside your program?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Hi, Larry,

Just wondered if it was possible to view the resources that are inside
the currently running program

Brian

LarryMc

is that a capability you are wanting to add to the program you've been working on with the grid?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

How did you guess! It was just an idea I had - load all the graphics in one go, and select
them when needed. No more re-compiling when a graphic was added that was
already scanned. Of course, would have to re-compile when a new scheme
was started, but that doesn't happen a lot

Brian

LarryMc

Quote from: Brian Pugh on February 01, 2014, 03:52:11 PM
How did you guess! It was just an idea I had - load all the graphics in one go, and select
them when needed. No more re-compiling when a graphic was added that was
already scanned. Of course, would have to re-compile when a new scheme
was started, but that doesn't happen a lot

Brian
I'm a little confused(so what else is new)
Right now(based upon the last code of yours I looked at) you can load all the images you want as resources whether they are used or not.
And if the img is in the resource file but unused  then all you have to do is get a file name into your database and then restart your program.
You don't have to recompile to do that.

It seems to me that all you really need to do, if I understand you correctly, is to modify your editing dialog but where you open the File dialog for an image so it calls a dialog with a list of all the images in the resource and you just pick what you want.

The drawback to that , right now, is you'd have to know the #xxxx number to select the proper resource.
But that is any easy fix.
You can have STRINGTABLE resources.
If you modify the code that you use to generate the RC file to generate STRINGTABLE resources with ID like 9xxxx for every #xxxx you have then in the editing dialog you could have it open up a list of images with both the #xxxx and the name of the image.  If you wanted to get fancy you could even add a preview image.

Piece of cake! ;D :o ;D
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

February 02, 2014, 04:14:16 AM #6 Last Edit: February 02, 2014, 06:23:14 AM by Brian Pugh
Hi, Larry,

Well, now it's me that's confused! Piece of cake! I'll have to think on that somewhat . . .

Brian

Update: Now got the program to load ALL the graphics on compile time. Will only
need to re-compile when new stuff is added

LarryMc

Quote from: Brian Pugh on February 02, 2014, 04:14:16 AM
Hi, Larry,

Well, now it's me that's confused! Piece of cake! I'll have to think on that somewhat . . .

Brian
Email me your latest iwb fie and I'll fix you up.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library