home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
zfamily.zip
/
zfamily
/
ZNLFUNCS
/
SAMPLE
/
TSTCLOSE.INC
< prev
next >
Wrap
Text File
|
1993-09-21
|
2KB
|
56 lines
/*
** /----------------------------------------------------------------------\
** | IBM Z Family Reusable Libraries/2 (5641-504) |
** |----------------------------------------------------------------------|
** | (C) Copyright International Business Machines Corporation 1993, 1994 |
** |----------------------------------------------------------------------|
** | DISCLAIMER OF WARRANTIES |
** | ------------------------ |
** | The following code is sample code created by IBM Corporation. |
** | Such a code is provided to you solely for the purpose of assisting |
** | you in the development of your applications. The code is provided |
** | "AS IS", without warranty of any kind. IBM shall not be liable for |
** | any damages arising out of your use of the following code, even if |
** | they have been advised of the possibility of such damages. | *
** \----------------------------------------------------------------------/
**
** Include : TSTCLOSE.INC
** Author : Dario de Judicibus (DEJUDICI at ROMEPPC)
** Reviewer : Dario de Judicibus (DEJUDICI at ROMEPPC)
** Created : 15 Jul 1992
** Updated : 21 Sep 1993
** Version : 3.22
** Content : Code block for Termination
**
** MAIN LOGIC
**
** - Ask user for confirmation to EXIT
** - Send WM_CLOSE to Test Object Window
** - Close the main window
**
*/
{
APIRET rc ;
char title[tstMAXSTRLEN] ;
char question[tstMAXSTRLEN] ;
/*
** Ask user for confirmation to EXIT
*/
WinLoadString(hAB, 0, tstSTR_EXITREQUEST, tstMAXSTRLEN, title) ;
WinLoadString(hAB, 0, tstWRN_AREYOUSURE, tstMAXSTRLEN, question) ;
rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
question,
title,
1,
MB_OKCANCEL | MB_APPLMODAL |
MB_MOVEABLE | MB_ICONQUESTION) ;
if (rc == MBID_CANCEL) break ;
/*
** Close the main window (in the mainline)
*/
}