Possible to load resources from a RC AND DLL the same time ?

Possible to load resources from a RC AND DLL the same time ?

Postby ukoenig » Tue Jul 12, 2016 6:15 pm

Hello

Is it possible to use / link resources from a RC-file
and load resources from a DLL the same time ?
I want to save hight resolution images to a extra DLL
and normal resources like dialogs and other controls to a normal RC-file
because I want to keep the EXE small in size

As long I load the IMAGES from a DLL and all other controls
are defined from code, it works perfect.
The logic is used in my sample to show animated images.
It would be perfect to load dialogs and other controls from resource as well.

with using :

hResources := GetResources()
SET RESOURCES TO "IMAGES.dll"


I can call images from the DLL
but how I can call the needed resources from the RC-file ?

sample :

DEFINE DIALOG oDlg RESOURCE "TEST" ; // from RC
FONT oFont1 TITLE "Image-test" TRANSPARENT

REDEFINE BITMAP oImage ID 110 OF oDlg RESOURCE "Internet.bmp" ADJUST // from DLL

because of < SET RESOURCES TO "IMAGES.dll >
the resources defined in the RC-files are ignored.

any idea ?

regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Possible to load resources from a RC AND DLL the same time ?

Postby nageswaragunupudi » Wed Jul 13, 2016 2:53 pm

hSave := GetResources()
SetResources( 0 )
// access from rc
SetResources( hSave )
// again back to DLL
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Possible to load resources from a RC AND DLL the same time ?

Postby ukoenig » Thu Jul 14, 2016 8:42 am

Mr. Rao
thank You very much

the problem

REDEFINE BTNBMP oABtn[1] ID 120 RESOURCE "Save" OF oDlg 2007 ;
( how doe's the button know that I want to use the image from the DLL ? )

I'm using Res.-workshop from Borland creating the normal resources and
Resedit to save alphablended BMP's to a DLL

the same problem maybe will be xBrowse with the resource defined with Res.workshop
and showing images from the DLL

RESEDIT creating a DLL with alphablended BMP's
( NOT possible using BORLAND Resource-Workshop )

Image

maybe I must include the images using a RES -file but that will create a very big EXE-file.
I would prefer using a external solution ( DLL )

regards
Uwe :?
Last edited by ukoenig on Thu Jul 14, 2016 9:21 am, edited 9 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Possible to load resources from a RC AND DLL the same time ?

Postby nageswaragunupudi » Thu Jul 14, 2016 9:01 am

There should not be any problem.
It is possible to keep switching between different DLLs and also linked RC/RES
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Possible to load resources from a RC AND DLL the same time ?

Postby Rick Lipkin » Thu Jul 14, 2016 12:26 pm

Uwe

I can not use 32 bit bitmaps .. I have to save them down to 24 in order for them to be compiled into my executable ? YES, I can save 32 bit bitmaps using Resedit, but when I compile to .res and burn into the .exe .. the .exe ( with borland 7 ) fails to create the .exe

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2663
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Possible to load resources from a RC AND DLL the same time ?

Postby ukoenig » Thu Jul 14, 2016 1:00 pm

Rick,

thank You sharing Your experience working with resources

I think the DLL-solution is a option

here are my first tests using a selected image from the DLL testing on different controls
the image : 32 bit alphablended

started from CODE ( tests resource + DLL will follow )

1. window-test -> Image and button

Image

2. Folderpage -> button and tabs

Image

3. Dialog and Folder -> image

Image

4. Folderpage -> xbrowse

Image

4. Folderpage -> transparent button

Image

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests