FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour .RC dialogs and images limit!?
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 02: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
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 03:01 PM

JC:

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

Thank you

Harvey
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 03: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 04: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
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 04: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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 04: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
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 05: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
.RC dialogs and images limit!?
Posted: Thu Sep 25, 2008 08: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
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
.RC dialogs and images limit!?
Posted: 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
.RC dialogs and images limit!?
Posted: Fri Sep 26, 2008 08: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
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
.RC dialogs and images limit!?
Posted: Fri Sep 26, 2008 01: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
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
.RC dialogs and images limit!?
Posted: Fri Sep 26, 2008 01: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 :
#ifdef __FLAT__
1 24 "WindowsXP.Manifest"
#endif


This is how my BAT-command looks like :
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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
.RC dialogs and images limit!?
Posted: Fri Sep 26, 2008 01: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
.RC dialogs and images limit!?
Posted: Fri Sep 26, 2008 02: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
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
.RC dialogs and images limit!?
Posted: Fri Sep 26, 2008 02: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.

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!