signatureP = WinGetBitmap(signatureWinH);
bitmapSize = BmpSize(signatureP); bitmapP = (char*)MemPtrNew(bitmapSize);
if (bitmapP) { MemSet(bitmapP, bitmapSize, 0); MemMove(bitmapP, signatureP, bitmapSize); }
Without reading through all your code, I think I see your problem. On OS 5, a bitmap consists of three (potentially) separate parts: the header, the color table, and the data. You can't count on them being contiguous in memory. (Take a look at Bitmap.h for details).
What you're doing above is copying the bitmap header and (_maybe_) the color table and (_maybe_) the actual bits into your chunk. Then again, maybe not. in my experience, the color table is usually contiguous, but it doesn't have to be.
One way to solve the problem is to get the individual bitmap components using WinGetBitmap (header), BmpGetColortable (color table), and BmpGetBits (data) and save them, then recreate the bitmap when you need to display it.
-- Regards, Steve Mann --- steve-at-slorevo.com Available for Contract Work
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
