> This leads to the next issue that if there is
> code which draws to the screen (WinDrawLine, WinDrawBitmap, ...),
> you must handle frmUpdateEvent and call that draw code.  Palm OS
> normally, but not always, saves the image under a form.  When it
> doesn't, it asks every form to redraw itself.  If your form doesn't
> handle frmUpdateEvent to draw special items, they won't appear.  If
> you use only standard Palm OS UI objects, you don't need to worry.
> The form code will do all of the redraw.  But we're still left with
> the final point, which is if you have code that redraws a form,
> don't use FrmGetActiveForm.  Your form may be underneath other forms
> and therefore it won't be the active form.  Instead, use
> FrmGetFormPtr to get a pointer to the form you want.

Roger,

Two questions:

1. It's only when processing a frmUpdateEvent that FrmGetActiveForm may
return another form's pointer?

2. If I have two forms Form1 and Form2 and I call FrmUpdateForm (Form2, x)
whilst Form1 is active, the frmUpdateEvent is sent to Form1's event handler.
Letting it fall through to FrmHandleEvent doesn't send it to Form2's event
handler. And the implication in your posting is that I may well receive a
frmUpdateEvent with a formID of other forms. Obviously, I'm not supposed to
handle redraws for all other forms in my Form1 event handler. I'm confused!

Stephen Best
Bitware Australia Pty. Ltd.

Reply via email to