home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / memsz331.zip / Source.zip / WINDOW.CPP < prev    next >
C/C++ Source or Header  |  1994-01-19  |  731b  |  53 lines

  1. // Class WINDOW: Encapsulates the startup/shutdown logic for a OS/2-PM window.
  2.  
  3. #define INCL_BASE
  4. #define INCL_PM
  5. #include <os2.h>
  6.  
  7. #include "debug.h"
  8.  
  9. #include "window.h"
  10.  
  11.   // Constructor
  12.  
  13. Window::Window
  14. (
  15.   HWND Parent,
  16.   PSZ ClassName,
  17.   PSZ Title,
  18.   ULONG Style,
  19.   LONG x,
  20.   LONG y,
  21.   LONG cx,
  22.   LONG cy,
  23.   HWND Owner,
  24.   HWND Zorder,
  25.   ULONG Id,
  26.   PVOID Parms,
  27.   PVOID PresParams
  28. )
  29. {
  30.   Handle = WinCreateWindow
  31.   (
  32.     Parent,
  33.     ClassName,
  34.     Title,
  35.     Style,
  36.     x, y, cx, cy,
  37.     Owner,
  38.     Zorder,
  39.     Id,
  40.     Parms,
  41.     PresParams
  42.   ) ;
  43. }
  44.  
  45.  
  46.   // Destructor
  47.  
  48. Window::~Window ( )
  49. {
  50.   WinSendMsg ( Handle, WM_SAVEAPPLICATION, 0, 0 ) ;
  51.   WinDestroyWindow ( Handle ) ;
  52. }
  53.