I have a form with a list of custom gadgets that need to be displayed.
Everything gets displayed correctly, except that I want to custom paint the
form background and can't determine how to do it. I can't call the painting
routines before I call FrmDrawForm (so the docs say), but FrmDrawForm calls
all the extended gadget drawing callbacks leaving me with no idea of what
parts of the screen to paint. I basically want to paint the background,
then have all the gadgets paint on top of it.
How can I do this?
See my comments in the follow form handler:
Boolean CPanelController::DefPanelFrmProc(EventType * eventP)
{
Boolean handled = false;
FormType * pForm = FrmGetActiveForm();
CPanel * pCurPanel = PanelFromForm(pForm);
switch (eventP->eType)
{
case menuEvent:
break;
case frmOpenEvent:
// <====== cant custom draw here because havent called
FrmDrawForm
FrmDrawForm(pForm); //<==== this makes all the gadgets draw on
the screen
handled = true; //<==== at this point I don't know what parts
to paint, without overwriting the gadgets
break;
case frmUpdateEvent:
FrmDrawForm(pForm);
handled = true;
break;
case penDownEvent:
break;
case ctlSelectEvent:
SndPlaySystemSound(sndClick);
default:
break;
}
return handled;
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/