home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / WTJ9403.ZIP / WILDASS / SOURCE / MAINWND.H < prev    next >
C/C++ Source or Header  |  1993-08-14  |  3KB  |  123 lines

  1. // mainwnd.h
  2. //
  3. // class interface to the main window class
  4. //
  5. // update: 1.00 27-Jul-93 tw
  6.  
  7. #ifndef _INC_MAINWND_H
  8. #define _INC_MAINWND_H
  9.  
  10. #define new DEBUG_NEW 
  11.  
  12. #include "iconbtn.h"
  13. #include "app.h"
  14.                                 
  15. class CMainWnd : public CFrameWnd
  16. {     
  17. private:  
  18.    CRect * m_pRectCaption;    // sizeof caption
  19.      
  20.    // the icon buttons
  21.    CIconButton m_arrIconButtons[ nIconButtons ];  
  22.    
  23.    // the "edit" buttons
  24.    CButton m_arrEditButtons[ nIconButtons ];
  25.           
  26.    // 3 toolbars
  27.    CToolBar m_wndTileBar,
  28.             m_wndWorkspaceBar,
  29.             m_wndOptionsBar;
  30.    
  31.    // the toolbars rects         
  32.    CRect    m_rectTileBar,
  33.             m_rectWorkspaceBar,
  34.             m_rectOptionsBar;            
  35.             
  36.    CRect    m_rectWnd;            
  37.    
  38.    // helpers 
  39.    void CreateToolBar(  CToolBar * pBar, 
  40.                         UINT nIdResource, 
  41.                         const UINT * pArrBtns, 
  42.                         CRect * pRect );
  43.             
  44.    void OnLaunch( int nGrp );
  45.    void OnEdit( int nGrp );
  46.                
  47. protected:
  48.    enum 
  49.    {  
  50.       // the toolbars sizes
  51.       cxImageToolBar = 10,   
  52.       cyImageToolBar = 10,
  53.       cxBtnToolBar = 16,
  54.       cyBtnToolBar = 16,
  55.       
  56.       cxFrameToolBar = 6,
  57.       cyFrameToolBar = 2,
  58.       
  59.    };            
  60.       
  61.    // number of buttons on toolbar      
  62.    int m_nToolBarButtons;
  63.  
  64. public:
  65.    CMainWnd(); 
  66.    ~CMainWnd();
  67.    
  68.    // the following is called by childs on drop events
  69.    void DroppedFiles( HDROP hDrop, UINT nID );
  70.    
  71. protected:                                               
  72.    afx_msg UINT OnNcHitTest( CPoint pnt );
  73.    afx_msg void OnPaint();
  74.    afx_msg BOOL OnEraseBkgnd( CDC* pDC );
  75.    
  76.    afx_msg void OnActivateApp( BOOL bActive, HTASK hTask );
  77.  
  78.    afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
  79.    afx_msg void OnSysCommand( UINT nID, LPARAM lParam );
  80.                          
  81.    // command handler for launch buttons
  82.    // (will call OnLaunchGroup() or OnEditGroup() )
  83.    void OnLaunchGrp1();
  84.    void OnLaunchGrp2();
  85.    void OnLaunchGrp3();
  86.    void OnLaunchGrp4();
  87.    void OnLaunchGrp5();
  88.    void OnLaunchGrp6();
  89.    void OnLaunchGrp7();
  90.    void OnLaunchGrp8();
  91.    void OnEditGrp1();
  92.    void OnEditGrp2();
  93.    void OnEditGrp3();
  94.    void OnEditGrp4();
  95.    void OnEditGrp5();
  96.    void OnEditGrp6();
  97.    void OnEditGrp7();
  98.    void OnEditGrp8();
  99.                             
  100.    DECLARE_MESSAGE_MAP()   
  101.  
  102. };
  103.                     
  104. // Toolbar buttons
  105. const UINT IDB_TILE1 = 101;
  106. const UINT IDB_TILE2 = 102;
  107. const UINT IDB_TILE3 = 103;
  108. const UINT IDB_TILE4 = 104;
  109.  
  110. const UINT IDB_WSP1 = 105;
  111. const UINT IDB_WSP2 = 106;
  112. const UINT IDB_WSP3 = 107;
  113. const UINT IDB_WSP4 = 108;
  114.  
  115. const UINT IDB_OPTS1 = 109;
  116. const UINT IDB_OPTS2 = 110;
  117. const UINT IDB_OPTS3 = 111;
  118. const UINT IDB_OPTS4 = 112;
  119.                     
  120. #endif // _INC_MAINWND_H
  121.  
  122.  
  123.