home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / addins / wins / winsapp.h < prev   
C/C++ Source or Header  |  1998-04-08  |  2KB  |  60 lines

  1. #ifndef _WINSAPP_
  2. #define _WINSAPP_
  3.  
  4.  
  5. class CWindowsList;
  6.  
  7. const long DEFAULTWIDTH = 200;
  8.  
  9. class CWinsApp : public CWinApp
  10. {
  11. public:
  12.     CWinsApp() { 
  13.         m_pWinMgr = NULL;
  14.         m_fAutoDir  = FALSE;    
  15.         m_fAutoSize  = FALSE;    
  16.         m_fAutoVis  = FALSE;    
  17.         m_iSortedCol = 0;
  18.         m_lSize = DEFAULTWIDTH;    
  19.     }
  20. // Overrides
  21.     // ClassWizard generated virtual function overrides
  22.     //{{AFX_VIRTUAL(CWinsApp)
  23.     public:
  24.     virtual BOOL InitInstance();
  25.     virtual int ExitInstance();
  26.     //}}AFX_VIRTUAL
  27.  
  28.     //{{AFX_MSG(CWinsApp)
  29.         // NOTE - the ClassWizard will add and remove member functions here.
  30.         //    DO NOT EDIT what you see in these blocks of generated code !
  31.     //}}AFX_MSG
  32.     DECLARE_MESSAGE_MAP()
  33.  
  34. public:
  35.     void SetCommands(CWindowsList *pWindowsList) {m_pWinMgr = pWindowsList; };
  36.     CWindowsList *GetCommands() {return(m_pWinMgr); };
  37.     void SetAutoDir(BOOL fAutoDir) { m_fAutoDir = (DWORD)fAutoDir; }
  38.     BOOL GetAutoDir() { return((BOOL)m_fAutoDir); };
  39.     void SetAutoSize(BOOL fAutoSize) { m_fAutoSize = (DWORD)fAutoSize; }
  40.     BOOL GetAutoSize() { return((BOOL)m_fAutoSize); };
  41.     void SetAutoVis(BOOL fAutoVis) { m_fAutoVis = (DWORD)fAutoVis; }
  42.     BOOL GetAutoVis() { return((BOOL)m_fAutoVis); };
  43.     void SetSortedCol(long lSortedCol) { m_iSortedCol = lSortedCol; }
  44.     long GetSortedCol() { return(m_iSortedCol); };
  45.     long GetSize() { return(m_lSize); };
  46.     void SetSize(long lSize) { m_lSize = lSize; };
  47.  
  48. protected:
  49.     CWindowsList *m_pWinMgr;
  50.     DWORD    m_fAutoDir;
  51.     DWORD    m_fAutoSize;
  52.     DWORD    m_fAutoVis;
  53.     long    m_iSortedCol;
  54.     long    m_lSize;
  55. };
  56.  
  57.  
  58. extern CWinsApp theApp;
  59.  
  60. #endif