You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Is there a limit to the size of file that PBres can deal with? I am getting the GPF box when I compile a slightly enlarged file that was OK yesterday - taking out the extra bits makes no difference now!!! The RC file is 97452 and it needs 1.55Mb BMP's. The last compiled PBR was 1394482 in size. Any thoughts please
Iain Johnstone
“None but those who have experienced them can conceive of the enticements of science” - Mary Shelley
While I am not sure if there is a limit to the size of a PB Resource file (I think there may be), you can easily get around any limit by breaking up your Resources into multiple Resource files (which is more efficient).
While PB only allows ONE Resource file per EXE or DLL, you can use multiple DLLs as Libraries for Resources.
For example, I could create 10 different Bitmap Libraries using 10 different DLLs, each with its own Resources in it.
Then when a particular Library is needed simply use the API function LoadLibrary to load the Image Library and gets its Instance handle. With the handle you can use any of the API functions:
LoadBitmap
LoadImage
LoadCursor
LoadIcon
to extract the necessary resources from the DLL.
If the Library isn't needed then you can use the API function FreeLibrary to unload the DLL.
By breaking up the Resources into multiple DLLs, you make your program more efficient. Also the main EXE will load faster and you only need to load a Library when the Resources are actually
needed.
Thanks chaps - I have got round the problem temporarily by removing the bitmaps from the RC and loading them in from the main directory as discrete files - not what I really wanted. The DLL route is going to be the one to try!
Thanks for your thoughts
Iain Johnstone
------------------
“None but those who have experienced them can conceive of the enticements of science” - Mary Shelley
Originally posted by Iain Johnstone: The RC file is 97452 and it needs 1.55Mb BMP's. The last compiled PBR was 1394482 in size.
As I remember, it's not possible to declare ASCIIZ more than approx 1350000-1400000 (GPF).
Perhaps, these problems are linked.
BMP-format is too fat. Could be it possible to convert to WMF or TIFF ?
To show WMF is enough simple, using API; tiff - there is special DLL (iSource ?).
[This message has been edited by Semen Matusovski (edited April 20, 2000).]
I have found the problem - one of the files was reported to be 67Mb, so I am not suprised that there was a problem. However, all the BMPs are now DLLs - should have done it ages ago but lacked the courage! This has reduced the EXE from 1.9Mb to 650K - must easy to distribute upgrades. Many thanks
Iain Johnstone www.mstdrain.co.uk
------------------
“None but those who have experienced them can conceive of the enticements of science” - Mary Shelley
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment