> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Up to now I was loading my bitmaps into my application by doing:
> bmpHandle = DmGet1Resource('Tbmp',MyBitmap);
>
> But now that I am replacing my bitmaps with bitmap families,
> how do I load them?
The exact same way, using the ID of the bitmap family you specified in
Constructor.
But consider using DmGetResource (no "1") instead. If some Hack (or some
hacker on your own team!) opens another resource DB while your app is
running, then DmGetResource will still work but DmGet1Resource will fail.
Performance will be the same with either function.
Also consider changing 'Tbmp' to bitmapRsc in your code. It's cleaner to
use the symbolic constant instead of the hard coded literal.
> Executing the above statement on one of the bitmaps of a family
> always return NULL.
There is no such thing as loading one of the bitmaps of a family. A
Constructor bitmap family _is_ a single bitmap resource on the Palm. When
you make a bitmap family in Constructor, the post linker squashes all the
separate Constructor bitmaps together to make a single Palm bitmap, and
discards the IDs of the original Constructor bitmaps.
(Same goes for GCC/PilRC too, as far as I know.)
Tip: the Insider utility is great for seeing exactly what resources are in
your app, to help debug problems like this.
-slj-
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html