home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dho.zip / DHO / SRC / PMWRAP.CC < prev    next >
C/C++ Source or Header  |  1995-08-27  |  949b  |  41 lines

  1. /****************************************/
  2. /*    Developer Helper Object Set       */
  3. /*  (C) 1994-95 Thomas E. Bednarz, Jr.  */
  4. /*     All rights reserved              */
  5. /***************************************/
  6.  
  7. /* $Id: pmwrap.cc 1.1 1995/08/25 08:24:00 teb Exp $ */
  8. #define INCL_WIN
  9. #include<os2.h>
  10.  
  11. #include"pmwrap.h"
  12.  
  13.  
  14. //-------------------------------------------------------------------
  15. //  TPMWrapWindow
  16. TPMWrapWindow::TPMWrapWindow(ULONG id, TWinBase *parent):
  17.    TWindow(id, parent)
  18. {
  19.  
  20. }
  21.  
  22.  
  23. //-------------------------------------------------------------------
  24. //  init
  25. BOOL TPMWrapWindow::init()
  26. {
  27.    if (hwnd != (HWND)NULL)
  28.    {
  29.       WinSetWindowULong(hwnd,0,(ULONG)this);
  30.  
  31.       oldWndProc = WinSubclassWindow(hwnd, (PFNWP)getWindowProc());
  32.       if (oldWndProc==(PFNWP)NULL)
  33.       {
  34.          WinDestroyWindow(hwnd);    
  35.          return FALSE;
  36.       }
  37.       return TRUE;
  38.    }
  39.    return FALSE;   
  40. }
  41.