Slide 7.13: Line-by-line anatomy of Hello_a.c (cont.)
  Slide 8.1: Form demonstrations
  Home


Line-by-line Anatomy of Hello_a.c (Cont.)


pfrm = FrmGetActiveForm( );
The function FormType *FrmGetActiveForm( void ) returns the currently active form.

FrmDrawForm( pfrm );
The function void FrmDrawForm( FormType *formP ) draws all objects in a form and the frame around the form. You should call this function in response to a frmOpenEvent.
FrmHandleEvent( FrmGetActiveForm( ), &e );
The function Boolean FrmHandleEvent( FormType *formP, EventType *eventP ) handles the event that has occurred in the form. It returns true if the event was handled. The table provides an overview of how FrmHandleEvent handles different events.

You should not call this function directly. Instead, call Boolean FrmDispatchEvent( EventType *eventP ) dispatches an event to the application's handler for the form. It passes events to a form's custom event handler and then, if the event was not handled, to FrmHandleEvent( ).

FrmCloseAllForms( );
The function void FrmCloseAllForms( void ) sends a frmCloseEvent to all open forms. Applications can call this function to ensure that all forms are closed cleanly before exiting PilotMain( ); that is, before termination.