home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / zfamily.zip / zfamily / ZISFUNCS / SAMPLE / TSTCLOSE.INC < prev    next >
Text File  |  1993-09-01  |  2KB  |  57 lines

  1. /*
  2. ** /----------------------------------------------------------------------\
  3. ** |             IBM Z Family Reusable Libraries/2 (5641-504)             |
  4. ** |----------------------------------------------------------------------|
  5. ** | (C) Copyright International Business Machines Corporation 1993, 1994 |
  6. ** |----------------------------------------------------------------------|
  7. ** |                       DISCLAIMER OF WARRANTIES                       |
  8. ** |                       ------------------------                       |
  9. ** | The following code is sample code created by IBM Corporation.        |
  10. ** | Such a code is provided to you solely for the purpose of assisting   |
  11. ** | you in the development of your applications. The code is provided    |
  12. ** | "AS IS", without warranty of any kind.  IBM shall not be liable for  |
  13. ** | any damages arising out of your use of the following code, even if   |
  14. ** | they have been advised of the possibility of such damages.           |                                                                         *
  15. ** \----------------------------------------------------------------------/
  16. **
  17. **  Module  : TSTCLOSE.INC
  18. **  Authors : Alessandro Cavallini (CAVALLI at ROMEPPC)
  19. **            Pino Venturella (VENTUREL at ROMEPPC)
  20. **  Reviewer: Dario de Judicibus (DEJUDICI at ROMEPPC)
  21. **  Created : 06 Jul 1992
  22. **  Updated : 31 Aug 1993
  23. **  Version : 3.12
  24. **  Content : Code block for Termination
  25. **
  26. **  MAIN LOGIC
  27. **
  28. **  - Ask user for confirmation to EXIT
  29. **  - Send WM_CLOSE to Test Object Window
  30. **  - Close the main window
  31. **
  32. */
  33. {
  34.    APIRET rc ;
  35.    char title[tstMAX_STR_LEN] ;
  36.    char question[tstMAX_STR_LEN] ;
  37.  
  38.   /*
  39.   **  Ask user for confirmation to EXIT
  40.   */
  41.    WinLoadString(hAB,0,tstSTR_EXITREQUEST,tstMAX_STR_LEN,title) ;
  42.    WinLoadString(hAB,0,tstWRN_AREYOUSURE,tstMAX_STR_LEN,question) ;
  43.  
  44.    rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
  45.                       question,
  46.                       title,
  47.                       1,
  48.                       MB_OKCANCEL | MB_APPLMODAL |
  49.                       MB_MOVEABLE | MB_ICONQUESTION) ;
  50.  
  51.   if (rc == MBID_CANCEL) break ;
  52.  
  53.   /*
  54.   **  Close the main window
  55.   */
  56. }
  57.