APPNOTE: Alternatives to QuickWin Termination Message BoxLast reviewed: February 16, 1996Article ID: Q76368 |
The information in this article applies to:
SUMMARYThis application note provides three new functions as alternatives to terminating a QuickWin program. To obtain this application note, "Alternatives to QuickWin Termination Message Box," call Microsoft Product Support Services. HF0450 can be found in the Microsoft Software Library. Download HF0450.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
MORE INFORMATIONThe following is the text of the application note:
Microsoft Product Support Services Application Note (Text File) HF0450: ALTERNATIVES TO QUICKWIN TERMINATION MESSAGE BOX Revision Date: 9/91 Disk IncludedThe following information applies to Microsoft FORTRAN version 5.1.
-------------------------------------------------------------------- | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY | | ACCOMPANY THIS DOCUMENT (collectively referred to as an | | Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY | | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO | | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A | | PARTICULAR PURPOSE. The user assumes the entire risk as to the | | accuracy and the use of this Application Note. This Application | | Note may be copied and distributed subject to the following | | conditions: 1) All text must be copied without modification and | | all pages must be included; 2) If software is included, all files | | on the disk(s) must be copied without modification [the MS-DOS(R) | | utility DISKCOPY is appropriate for this purpose]; 3) All | | components of this Application Note must be distributed together; | | and 4) This Application Note may not be distributed for profit. | | | | Copyright 1991 Microsoft Corporation. All Rights Reserved. | | Microsoft, MS-DOS, and the Microsoft logo are registered | | trademarks and Windows is a trademark of Microsoft Corporation. | --------------------------------------------------------------------This application note illustrates how to modify the QuickWin default for program termination. Included on the enclosed "Alternatives to QuickWin Termination Message Box" disk are the files listed below; these files include the new object modules to be added to the QuickWin run-time library, a batch file that adds the object files to the QuickWin run-time library, and a sample program that asks the user which of the three available exit methods to use to terminate the application.
File Description ---- ----------- EXMODE.FOR FORTRAN QuickWin program example QWIN.LIB Library of object modules to be added to the QuickWin run-time library EXITMODE.OBJ Additional object module to be added to the QuickWin run-time library REPLACE.BAT Batch file that modifies the existing QuickWin run-time library to include QWIN.LIB and EXITMODE.OBJ FLIB.FI Updated FLIB.FI FLIB.FD Updated FLIB.FDThere are three alternatives for terminating a QuickWin application:
Implementing the Alternative Exit Mode Functions
INTERFACE TO INTEGER*2 FUNCTION SETEXITQQ(EXITMODE) INTEGER*2 EXITMODE END INTERFACE TO INTEGER*2 FUNCTION GETEXITQQ() ENDSETEXITQQ returns a 0 for success and a -1 for failure. The function will fail upon an incorrect argument. SETEXITQQ takes an argument of one of the following three constant values and sets the exit mode accordingly:
Constant Value Result -------------- ------ QWIN$EXITPROMPT Sets the exit mode to display the termination message box (the default) QWIN$EXITNOPERSIST Sets the exit mode to suppress the termination message box and closes the application window QWIN$EXITPERSIST Sets the exit mode to suppress the termination message box and leaves the application window openGETEXITQQ returns the current exit mode, which is one of the above constant values.
Running the Sample ProgramAfter copying EXMODE.FOR to your hard disk, compile the program at the command prompt as follows:
fl /MW exmode.forRun the program as you would any QuickWin application, either by selecting EXMODE.EXE from the File Manager, by choosing Run from the File menu and typing the full path to EXMODE.EXE, or by typing the following at the command prompt:
win exmodeThe sample program prompts you for the desired exit mode (select 1 for QWIN$EXITPROMPT, 2 for QWIN$EXITNOPERSIST, or 3 for QWIN$EXITPERSIST). The program then uses GETEXITQQ to display the current exit mode and uses SETEXITQQ to set the exit mode to the desired value. If the exit mode is correctly set, the program then calls GETEXITQQ to display the new exit mode before exiting as directed.
|
Additional reference words: 5.00 5.10 softlib appnote HF0450.exe
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |