Resource db questions.

Discuss PocketC for Palm OS (including Desktop Edition)

Postby Victor Slade on Thu Sep 23, 2004 12:34 pm

Some questions regarding resource files and PToolbox bitmap indexes vs. bitmap resource ID's.

1. Did Jeremy fix the resopen() database ID to return 1 based ID?

2. When dealing with multiple resource databases, how are bitmap indexes assigned? example scenario:

application has 3 bitmaps embedded; ID 1001, 1002, 1003
these get indexes 0,1,2

application resopen()'s res1.prc with 3 bitmaps: ID 2001,2002,2003
do these get indexes 3,4,5 ?

application rescloses()'s res1.prc (using index returned by resopen())

application now resopen()'s res2.prc with 4 bitmaps: ID 2001,2002,2003,2004
will these now have indexes 3,4,5,6 ?

3. If the app did this:

int one,two;
one = resopen("res1.prc");
two = resopen(res2.prc");

What happens with the PToolBox indexes assigned to the bitmaps in res1.prc?
Victor Slade
Posts: 19
Joined: Tue Dec 05, 2000 1:52 pm
Location: USA

Postby jstadolnik on Thu Sep 23, 2004 1:14 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
What happens with the PToolBox indexes assigned to the bitmaps in res1.prc?
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Accessing bitmaps via index only works when a bitmap resource file is opened with OpenBmpDb() in "lock&load" mode (which is the default).


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

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 4 guests