Dear Antonio and friends,
Exists a limit of number the dialogs and images into a .RC file?
JĂșlio CĂ©sar M. Ferreira
FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Dear Antonio and friends,
Exists a limit of number the dialogs and images into a .RC file?
JC:
I have an rc with almost 600 "includes"...And have hit a limit.
hag wrote:JC:
I have an rc with almost 600 "includes"...And have hit a limit.
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
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
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 ![]()
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?
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 ?
I edit directly with Pelles 5
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.
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.
#ifdef __FLAT__
1 24 "WindowsXP.Manifest"
#endifCOPY 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.RCRegards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773
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
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.)
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!