home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / mag&info / msjv7_5.zip / WINCPP.ARJ / CPP1.ARJ / WINAPP.H < prev   
C/C++ Source or Header  |  1992-09-01  |  1KB  |  40 lines

  1. // WinApp.h RHS 4/15/92
  2.  
  3. #if !defined(WINAPP_H)
  4. #define WINAPP_H
  5.  
  6. #include<windows.h>
  7.  
  8. class WinApp
  9.     {
  10.     HINSTANCE   hInstance;
  11.     HINSTANCE   hPrevInstance;
  12.     LPSTR       lpCmdLine;
  13.     int         nCmdShow;
  14.  
  15. public:
  16.     WinApp(void)        // constructor -- initializes data members
  17.         {
  18.         hInstance = hPrevInstance = 0;
  19.         lpCmdLine = NULL;
  20.         nCmdShow = 0;
  21.         }
  22.     ~WinApp(){}         // virtual destructor, allows overriding
  23.                         // functions to access data members
  24.     HINSTANCE   Instance(void)      {   return  hInstance;      }
  25.     HINSTANCE   PrevInstance(void)  {   return  hPrevInstance;  }
  26.     LPSTR       CmdLine(void)       {   return  lpCmdLine;      }
  27.     int         CmdShow(void)       {   return  nCmdShow;       }
  28.  
  29.     void Init(HINSTANCE hInst,HINSTANCE hPrev,LPSTR cmdLine,int cmdShow)
  30.         {
  31.         hInstance = hInst;
  32.         hPrevInstance = hPrev;
  33.         lpCmdLine = cmdLine;
  34.         nCmdShow = cmdShow;
  35.         }
  36.     };
  37. #endif
  38.  
  39.  
  40.