.RC dialogs and images limit!?

.RC dialogs and images limit!?

Postby JC » Thu Sep 25, 2008 2:39 pm

Dear Antonio and friends,

Exists a limit of number the dialogs and images into a .RC file?
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby hag » Thu Sep 25, 2008 3:01 pm

JC:

I have an rc with almost 600 "includes"...And have hit a limit.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby JC » Thu Sep 25, 2008 3:12 pm

hag wrote:JC:

I have an rc with almost 600 "includes"...And have hit a limit.


Harvey,

How I can get the BCC556?
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby Antonio Linares » Thu Sep 25, 2008 4:20 pm

Julio,

Whats the size of your RES file ? It can't be larger than 1024 Ks.

If larger, then you have to split your RC into several ones and have several RES files
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby driessen » Thu Sep 25, 2008 4:23 pm

Antonio,

I don't agree that a RES-file may not exceed 1024 KB.

In my application, I have a RES file which is bigger than 1300 KB and everything is working fine.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Thu Sep 25, 2008 4:26 pm

Michel,

yes, you may be right. I am probably wrong about the exact size.

But when that problem arises, the solution is to split the RES into several ones :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby JC » Thu Sep 25, 2008 5:31 pm

Antonio,

I use a .dll file to make the system more less. Our system have many dialogs.

Turning to resource everything, it will be very large. So, how is the best way? .DLL or several resouces?
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby Antonio Linares » Thu Sep 25, 2008 8:19 pm

Julio,

Do you directly edit the DLL and modify it ?

Or do you keep a RC file that later on you place in the DLL ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby JC » Thu Sep 25, 2008 10:59 pm

I edit directly with Pelles 5
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby Antonio Linares » Fri Sep 26, 2008 8:06 am

Júlio,

You have two choices:

1) Create and use another DLL. You will have to switch from one to another in runtime from your application.

2) Extract the RC from your DLL, split it in two RC files and create two RES files. But you won't be able to keep using PellesC.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby JC » Fri Sep 26, 2008 1:11 pm

Antonio Linares wrote:Júlio,

You have two choices:

1) Create and use another DLL. You will have to switch from one to another in runtime from your application.

2) Extract the RC from your DLL, split it in two RC files and create two RES files. But you won't be able to keep using PellesC.


Both choices are not very good!
At first, I have to switch between .Dll
In the second, the size of the executable will grow a lot.

If were you Antonio, how they you choose?
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby driessen » Fri Sep 26, 2008 1:19 pm

Julio,

This is the way I use, which works very fine.

1. I use Resource Workshop to make my DLL-files. I have 8 DLL-files in total, containing all my needed resources.

2. I save all these DLL-files as RC-files.

3. I use a simply BAT-command to make 1 RES-file. In this BAT-command, the MANIFEST.RC is added.

This is how MANIFEST.RC looks like :
Code: Select all  Expand view
#ifdef __FLAT__
1 24 "WindowsXP.Manifest"
#endif


This is how my BAT-command looks like :
Code: Select all  Expand view
COPY FILE1.RC+FILE2.RC+FILE3.RC+FILE4.RC+FILE5.RC+FILE6.RC+FILE7.RC+FILE8.RC+MANIFEST.RC FILEALL.RC
C:\PROGRA~1\BORLAND\BCC55\BIN\BRC32.EXE -R FILEALL.RC

The result is 1 file called FILEALL.RES

All my RC-files together are 2.5 MB, my RES-file is 1.3 MB.

4. I link the files FILEALL.RES into my application.

Indeed my application becomes bigger by using this method but who cares about the size of an executable. It is working very well.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby James Bott » Fri Sep 26, 2008 1:59 pm

Julio,

>In the second, the size of the executable will grow a lot.

Why is this a problem? The other way (using a DLL) the total size is probably similar (DLL + EXE). If you make any changes to the DLL you will still have to distribute the same size ZIP or install.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Fri Sep 26, 2008 2:03 pm

Julio,

Personally I prefer to work with RC files, as they are ascii files that can be edited with a source code editor (to search, do replacements, copy and paste, etc.)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Gale FORd » Fri Sep 26, 2008 2:23 pm

I ran across some problems with editing large .dll with Resource Workshop. So now I create a .rc files for different sections of my program.
Then create .dll file with the following batch file for Borland compiler.

Code: Select all  Expand view
rem myrc2dll.bat
rem RC file to 32 bits resources DLL
rem Here is output file
set xdll=diwin32

rem Because sometimes uuid.lib gets lost I use copy to always have file.
copy uuid.lib.sav uuid.lib

c:\bcc55\bin\bcc32 -c c:\fwh\dll\screen32.c

rem Here compile my different .rc files
c:\bcc55\bin\brc32 -r diwindlg.rc
c:\bcc55\bin\brc32 -r diwinbmp.rc

c:\bcc55\lib\import32.lib,, %xdll%.res
c:\bcc55\bin\ilink32 /Tpd c:\bcc55\lib\c0d32.obj screen32.obj, %xdll%.dll,,c:\bcc55\lib\cw32.lib c:\bcc55\lib\import32.lib,, diwindlg.res diwinbmp.res
rem Notice you can add all .res files to line above

rem Now clean up all files not needed anymore.
del uuid.lib
rem goto done
del *.il*
del *.map
del *.obj
del *.res
del *.tds
:done
echo done!
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests