At 10:18 AM 5/14/2004, you wrote:
Hi all,

Does anyone know if it is possible to call BmpCreate to create a bitmap, and
then set the owner of that bitmap to 0 so that the entire bitmap does not
get freed by the system when you exit your app?  Simply setting the owner of
the return value (the BitmapPtr) does not appear to be enough, since I
assume that there is memory allocated for the actual bitmap data somewhere
else.

I tried calling BmpGetBits and setting the owner of that pointer to 0, but
that results in an "invalid chunk" error.

Chris, I'd use the code in the BitmapRsrc example to create your bitmap using your own structures, with your own heap allocation calls. Then you should be able to set the owner without any problems. Of course, setting the owner to keep chunks around won't work in Palm OS Cobalt, since each process has its own heap.


http://kb.palmsource.com/cgi-bin/palmsource.cfg/php/enduser/std_adp.php?p_faqid=341


-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to