At first sight, it looks like the way to go to me.... I'm just wondering if you shouldn't use DmWrite iso MemMove.
Good luck, Caspar -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fruber Malcome Sent: Thursday, January 29, 2004 4:34 AM To: Palm Developer Forum Subject: BitmapPtr and DmAddResource I have a BitmapPtr, what is the most efficient way to add it to a resource db as a 'Tbmp' resource? I currently do something very ugly: UInt32 cbMem = ((UInt32)uiBmpRowBytes * (UInt32)cinfo.image_height); MemHandle hBmp = NULL; hBmp = DmNewResource( rDbCache, 'Tbmp', 501, cbMem ); UInt8* bDest = NULL; bDest = (UInt8*)MemHandleLock( hBmp ); MemMove( bDest, pBmp, cbMem ); MemHandleUnlock( hBmp ); DmReleaseResource( hBmp ); Please tell me I am doing this wrong and that there is a better way. thanks - bill -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
