Open/Bmp/RsrcDb question

Postby Mikael on Fri Oct 10, 2003 10:38 am

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,

Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Fri Oct 10, 2003 11:43 am

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".


The PToolboxLib guy.
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 2 guests