{ OBJECT *tree; WINDOW *win; static char title[] = "Formular title"; void (*DoForm)( WINDOW *); /* see below */ /* Create a formular */ rsrc_gaddr( 0, MYDIAL, &tree); win = FormCreate( tree, MOVER|NAME|SMALLER|CLOSER, DoForm, title, NULL, TRUE, FALSE); /* Save the formular */ FormSave( win, OC_FORM); }/* restore the formular (when a CANCEL button is selected) */
void GereForm( WINDOW *win) { if( evnt.buff[4] == MYDIAL_ANNUL) { Restore( win, OC_FORM); /* On restore l'état */ snd_msg( win, WM_CLOSED); } }