Hi, I hope someone can help out here.. I've been beating my head on this problem for far too long.
I need to create a dynamic bitmap and store it in a resource DB. The problem is that I have a pointer to the bitmap, and to stuff it in the resource DB with something like DmAttachResource, I need a handle. So, I tried to use DmNewResource - ultimately got a pointer - and then tried a MemMove from my original bitmap to the bitmap in the resource DB. I get an error with that approach - attempt to write to memory location which is in the storage heap - such direct access is not allowed - should use special Palm OS functions for this purpose. See code snip below... Can someone tell me what function I should use? Or is my approach completely flawed to begin with? Thanks, Ellen Code snip: // create a new entry in resource db for bitmap bmH = DmNewResource (bm_dbR, 'Tbmp', 3333, BmpSize(bmpP)); if (bmH) { // now copy the bitmap in... // lock it .. resBmpP = (BitmapPtr) MemHandleLock(bmH); // attempt copy ... this doesn't work MemMove (resBmpP, bmpP, BmpSize(bmpP)); // draw it on the current form frmP = FrmGetActiveForm(); FrmNewBitmap(&frmP, 3333, 3333, 50, 100); // unlock it MemHandleUnlock(bmH); } _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/