Page 1 of 1

PostPosted: Fri Oct 10, 2003 10:38 am
by Mikael
I know this probably sounds like a silly question, but is it still neccessary to use OpenBmpDb() and OpenRrscDb() if I'm embedding my .prcs with Par? I only ask because I found that my app still works fine without them. Is this because Par causes the app to look within itself before looking elsewhere? If it is neccessary, am I doing something wrong with the following?

I currently do: OpenBmpDb(#My_App");
//rest goes here
I used to do OpenBmpDb("#My_Bmp"),
/rest goes here

I also think the following might be wrong.
I currently do: OpenRsrcDb("My_App");
//rest goes here
I used to do: OpenRsrcDb("My_Rsrc");
//rest goes here

Either way no matter which method I use my app still works fine.
I was just curious.

Thanks in advance,

Mikael

PostPosted: Fri Oct 10, 2003 11:43 am
by jstadolnik
When you launch an application .prc that file is opened and any resources in it become available. Thus OpenRsrcDb and OpenBmpDb are not needed if all of your resources are embedded in your app's .prc file... Well, there is one exception, if you are using OpenBmpDb in lock&load mode you still need to make that call (this is not required for load-on-demand bitmap mode).

There is actually a blurb about this in the PToolbox documentation. It's in the description of the FastBmp function. It says: If no bitmap database is opened, then the application .prc is file itself is searched for bitmaps. In this case the mode is "load-on-demand".

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm