home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dho.zip / DHO / SRC / WINBASE.H < prev    next >
C/C++ Source or Header  |  1995-09-03  |  2KB  |  69 lines

  1. /****************************************/
  2. /*    Developer Helper Object Set       */
  3. /*  (C) 1994-95 Thomas E. Bednarz, Jr.  */
  4. /*     All rights reserved              */
  5. /***************************************/
  6.  
  7. /* $Id: winbase.h 1.9 1995/09/03 01:22:29 teb Exp $ */
  8.  
  9.  
  10. #ifndef __WINBASE_H__
  11. #define __WINBASE_H__
  12.  
  13. #define INCL_PM
  14. #define INCL_WIN
  15. #define INCL_GPI
  16. #include <os2.h>             
  17. #include<object.h>
  18.  
  19.  
  20. const ULONG WinBase_NoResource = 0;
  21.  
  22. class WinMsg
  23. {
  24.    public:
  25.       HWND hwnd;
  26.       ULONG msg;
  27.       MPARAM mp1;
  28.       MPARAM mp2;
  29. };
  30.  
  31.  
  32. class TWinBase : public TObject
  33. {
  34.  
  35.    protected:
  36.      ULONG fResource;
  37.      HWND hwnd;
  38.    public:
  39.       TWinBase(ULONG id);
  40.       virtual ~TWinBase(void);
  41.       virtual BOOL init()=0;
  42.       virtual const char *getClassName(void);
  43.       HWND getHWND(void);
  44.       virtual void doCommand(WinMsg wm);
  45.       virtual void doControl(WinMsg wm);
  46.  
  47.       BOOL isEnabled();
  48.       BOOL enableUpdate(BOOL enable);
  49.       BOOL isVisible();
  50.  
  51.       virtual BOOL setParent(TWinBase *parent, BOOL redraw);
  52.       BOOL isChild(TWinBase *parent);
  53.  
  54.       void hideWindow();
  55.       void showWindow();
  56.  
  57.       void setFrameTitle(char *title);
  58.       void shellSetPosition(); 
  59.       void setWindowPosition(LONG x, LONG y);
  60.       void getWindowPosition(LONG &x, LONG &y, LONG &cx, LONG &cy);
  61.       void setWindowSize(LONG cx, long cy);
  62.       void update();
  63.       void forceUpdate();
  64. };
  65.  
  66.  
  67. #endif  /* winbase */
  68.  
  69.