I have a form on which I have a graphical area I draw in kCoordinatesNative mode (320x320).
I also maintain 2 rows of buttons at the bottom of the form where the 2nd row will display differently labeled buttons at different times. I do the following to save and restore bits in the graphical area:
WinSetCoordinateSystem(kCoordinatesNative); cursorP->savedCursorWin = WinSaveBits(&cursorP->savedCursorRect, &error);
At some other point in time when the bottom row of buttons is now different from what was on display when WinSaveBits() was done, I call:
WinSetCoordinateSystem(kCoordinatesNative); WinRestoreBits(cursorP->savedCursorWin, x-4, y-4);
My problem is right after WinRestoreBits(), the bottom row of buttons is written over by the row of buttons that was displayed when WinSaveBits() was called. I've checked my savedCursorRect coordinates over and over again and they are correct and are no where near the location of the buttons. Another puzzle, is even though the rectangle being saved is only 9x5 bits (topLeft = 92,112 and extent = 100, 116), the window of bits that is restored is much much bigger, approximately 60 x 120 bits. Is PalmOS saving more a much bigger area of bits than it should? It would explain why a part of my form beyond the graphical area is being re-drawn. And if so, why?
Lorraine
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
