Your call sequence is just fine.  I use it myself.
If you are not going to do any custom drawing, you can omit the FrmDrawForm(), as 
FrmDoDialog will call that if the form is not yet drawn.

-----Original Message-----
From: David Eyler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 9:47 PM
To: Palm Developer Forum
Subject: modal dialogs


I recently saw this comment in the FrmGetActiveForm() API call:

"You should not call the FrmGetActiveForm function when a popup window is
open. There is no active form while a popup is displayed, and the value
returned from FrmGetActiveForm in this situation has no meaning. "

Does this mean that you can't call FrmGetActiveForm() inside the event
handlers of FrmDoDialog?  Because I've been doing this regularly with no
problems.

Also, is this the correct call sequence for FrmDoDialog()?  I've looked at
other posts and couldn't find a definitive answer. I'm not sure whether the
FrmGetActiveForm and FrmSetActiveForm calls are necessary.

prevForm = FrmGetActiveForm()
popForm = FrmInitForm()
FrmSetActiveForm(popForm)
FrmDrawForm()
...drawing stuff here
FrmDoDialog()
...get user input here
FrmDeleteForm()
FrmSetActiveForm(prevForm()



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to