Verifying Exit and Quit

When VERIFYEXIT is set ON and the user presses the Exit key (by default, KEY_F10), the message window for the form pops up and the message "Do you want to exit this form [y/n]" is displayed. If the user presses a 'Y', he or she exits the form. Any values that he or she entered are converted and stored in the underlying data variables for the fields. If the user presses an 'N', the user is returned to the form.

When VERIFYQUIT is set ON and the user presses the Quit key (by default, KEY_ESC), the quit verification function pops-up the message window for the form and displays the message "Do you want to quit this form [y/n]". If the user presses a 'Y', he or she quits processing the form. Any values that he or she entered are discarded. If the user presses an 'N', the user is returned to the form.

Changing the Exit or Quit Message

The message that appears requesting confirmation of exit or quit can be changed. All system and information messages are defined in an array located in vv_infomsg.c and are accessed by #defined index values. The verify-quit message is accessed with the index Quit:QUITFORMMSG. The verify-exit message is accessed with Exit:EXITFORMMSG.

To change the message, edit the appropriate message in the message array in vv_infomsg.c. Be sure to change the response characters to match the message (see below). If you make any changes to the messages, you will have to recompile the module and replace it in the library.

Changing the Response Characters for Verifying Exit and Quit

The response characters for verifying exit and quit are global variables initially set to 'y' and 'n'. The check is case insensitive. To change the response character, use the function:

void se_responsech(ch_yes, ch_no)
 
UCHAR ch_yes;
/* Character to accept for a yes response
*/
UCHAR ch_no;    
/* Character to accept for a no response
*/


Home Contents Previous Next