calling this function, seems to give me a bad bitmap. I'll provide some additional insight: If I call WinDrawBitmap on the pBmp, I get a perfect image.
If I do the following: MemHandle resH = NULL; resH = DmGetResource( 'Tbmp', 501 ); BitmapPtr bitmap = (BitmapPtr)MemHandleLock(resH); Then call WinDrawBitmap on the bitmap - I get garbage. Also - is there no other way to load a resource rather than calling the above function that performs the unecessary process of searching resource databases for the bitmap rather than use one that I know is correct? Maybe I'm better off storing this as a data record instead?? Where can I get recordP (pointer to locked data record)? - based on the code provided below? thanks for the help / info. bill "Caspar Heiden, vd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] 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/
