home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / BCPPOWL1.ZIP / OWLINC.ZIP / MODULE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  1.7 KB  |  74 lines

  1. // ObjectWindows - (C) Copyright 1991 by Borland International
  2.  
  3. #ifndef __MODULE_H
  4. #define __MODULE_H
  5.  
  6. #ifndef __OBJECT_H
  7. #include <object.h>
  8. #endif
  9.  
  10. #ifndef __WINDOWS_H
  11. #undef NULL
  12. #include <windows.h>
  13. #endif
  14.  
  15. #ifndef __OWLDEFS_H
  16. #include <owldefs.h>
  17. #endif
  18.  
  19. #ifndef __WINDOW_H
  20. #include <window.h>
  21. #endif
  22.  
  23. #ifndef __MDI_H
  24. #include <mdi.h>
  25. #endif
  26.  
  27. #ifndef __DIALOG_H
  28. #include <dialog.h>
  29. #endif
  30.  
  31. _CLASSDEF(TModule)
  32.  
  33. // Module Class 
  34.  
  35. class _EXPORT TModule : public Object {
  36. public:
  37.  
  38.     // Lib and WinMain args
  39.     HANDLE        hInstance;
  40.     LPSTR        lpCmdLine;
  41.  
  42.     int Status;
  43.     LPSTR Name;
  44.  
  45.     TModule(LPSTR AName, HANDLE AnInstance, LPSTR ACmdLine);
  46.     virtual ~TModule();
  47.  
  48.     BOOL LowMemory();
  49.     void RestoreMemory();
  50.     virtual PTWindowsObject ValidWindow(PTWindowsObject AWindowsObject);
  51.     virtual PTWindowsObject MakeWindow(PTWindowsObject AWindowsObject);
  52.     virtual int ExecDialog(PTWindowsObject ADialog);
  53.     HWND GetClientHandle(HWND AnHWindow);
  54.     virtual PTWindowsObject GetParentObject(HWND ParentHandle);
  55.     virtual void Error(int ErrorCode);
  56.  
  57.     // define pure virtual functions derived from Object class
  58.     virtual classType        isA() const
  59.         { return moduleClass; }
  60.     virtual Pchar nameOf() const
  61.         { return "TModule"; }
  62.     virtual hashValueType hashValue() const
  63.         {  return hashValueType(hInstance); }
  64.     virtual int       isEqual(RCObject module)  const
  65.             { return (hInstance == ((RTModule)module).hInstance); }
  66.     virtual void      printOn(Rostream outputStream) const
  67.             { outputStream << nameOf() << "{ hInstance = " 
  68.               << hInstance << " }\n"; }
  69. };    // end of Module class  
  70.  
  71. extern PTModule Module;
  72.  
  73. #endif // ifndef __MODULE_H
  74.