home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ab2c.zip / README < prev    next >
Text File  |  1996-03-19  |  2KB  |  51 lines

  1. NAME: AB2C.ZIP
  2.  
  3. COPYRIGHT:
  4. ----------
  5. Copyright (C) International Business Machines Corp., 1991,1995.
  6.  
  7. DISCLAIMER OF WARRANTIES:
  8. -------------------------
  9. The following [enclosed] code is sample code created by IBM
  10. Corporation.  This sample code is not part of any standard IBM product
  11. and is provided to you solely for the purpose of assisting you in the
  12. development of your applications.  The code is provided "AS IS",
  13. without warranty of any kind.  IBM shall not be liable for any damages
  14. arising out of your use of the sample code, even if they have been
  15. advised of the possibility of such damages.
  16.  
  17.  
  18. DESCRIPTION:
  19.  
  20. Contains a sample of intercepting the CLOSE event of the framewindow in
  21. a Visual Builder application.
  22.  
  23. You will have to attach a handler to the framewindow, if you want to
  24. intercept the CLOSE event.  In the handlers, I display a message box
  25. prompting for a YES or NO answer.
  26.  
  27. In the attached zip file, you will find IVBAB2C.HPP which contains the
  28. source code for the handlers.  IVBAB2C.VBE allows you to import the two
  29. handlers.
  30.  
  31. IVBAboutToCloseHandler is used to intercept the close message for the following
  32. scenarios:
  33.  
  34.   - Double-click on the system menu button.
  35.   - Select "Close" on the system menu.
  36.   - Press Alt + F4.
  37.   - Select "Close" from the system Window List.
  38.  
  39. IVBCloseMessageHandler is used to intercept the close message if you call
  40. the IFrameWindow::close() method to close the frame window.
  41. for
  42.  
  43. An example of attaching the handler(s) to the framewindow:
  44.  
  45.  - drop the handler(s) on the f/f surface in the compositor editor of a
  46.    visual part.
  47.  - connect the ready event of the visual part to the handler's "start" action
  48.  - connect IFrameWindow::this attribute to the above connection 's window param.
  49.  
  50.  
  51.