Hi,
I want to draw some stuff offscreen before I display it. I am using
WinDrawRectangle and find that it gets drawn to the screen and the offscreen
window that I create. How do I prevent it from drawing to the screen? I am
using Palm OS 3.5 for this project. Here is some code (fragments,
unimportant stuff removed) that I am using.
static void MainUpdateForm(void)
{
RectangleType r = colorRect;
FormPtr pForm = FrmGetActiveForm();
WinHandle hScreen, hOffscreen = NULL;
RectangleType rect;
UInt16 err;
FrmDrawForm(pForm);
// set display to hOffscreen
hOffscreen = WinCreateOffscreenWindow(160, 144, screenFormat, &err);
hScreen = WinSetDrawWindow(hOffscreen);
// massive code removed
loop() {
WinSetForeColor(something);
WinDrawRectangle(&r, 0);
}
// set display back to screen
hOffscreen = WinSetDrawWindow(hScreen);
// copy keyboard to screen
rect.topLeft.x = 0;
rect.topLeft.y = 0;
rect.extent.x = 160;
rect.extent.y = 144;
WinCopyRectangle(hOffscreen, hScreen, &rect, 0, COLORS_TOP, winPaint);
}
Any help will be greatly appreciated.
Mike McCollister
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html