home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c06 / lab05 / ex03 / mainfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  2.3 KB  |  84 lines

  1. // MainFrm.h : interface of the CMainFrame class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CFindDifferenceDialog;
  6.  
  7. class CMainFrame : public CFrameWnd
  8. {
  9. protected: // create from serialization only
  10.     CMainFrame();
  11.     DECLARE_DYNCREATE(CMainFrame)
  12.  
  13. // Attributes
  14. public:
  15.     CSplitter* GetSplitter() { return &m_wndSplitter; }
  16.     CProgressStatusBar *GetStatusBar() 
  17.                         { return &m_wndStatusBar; }
  18.     CDiffView *GetView(int nColumn);
  19.  
  20.     //preferences
  21.     void SetIgnoreCase(BOOL bIgnore){ m_bIgnoreCase = bIgnore; }
  22.     void SetIgnoreWhiteSpace(BOOL bIgnore)
  23.                             { m_bIgnoreWhiteSpace = bIgnore; }
  24.     void SetReadAheadOptLevel(UINT uLevel)
  25.                             { m_uReadAheadOptLevel = uLevel; }
  26.  
  27.     BOOL GetIgnoreCase() const { return m_bIgnoreCase; }
  28.     BOOL GetIgnoreWhiteSpace() const 
  29.                             { return m_bIgnoreWhiteSpace; }
  30.     UINT GetReadAheadOptLevel() const 
  31.                             { return m_uReadAheadOptLevel; }
  32.  
  33.  
  34. protected:
  35.     //  Preferences
  36.     BOOL        m_bIgnoreCase;            // Ignore case during comparison
  37.     BOOL        m_bIgnoreWhiteSpace;    // Ignore leading white space during comparison
  38.     UINT        m_uReadAheadOptLevel;
  39.  
  40.  
  41. // Operations
  42. public:
  43.     void WriteRegistryPreferences();
  44.     void ReadRegistryPreferences();
  45.  
  46.  
  47. // Overrides
  48.     // ClassWizard generated virtual function overrides
  49.     //{{AFX_VIRTUAL(CMainFrame)
  50.     virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  51.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  52.     //}}AFX_VIRTUAL
  53.  
  54. // Implementation
  55. public:
  56.     virtual ~CMainFrame();
  57. #ifdef _DEBUG
  58.     virtual void AssertValid() const;
  59.     virtual void Dump(CDumpContext& dc) const;
  60. #endif
  61.  
  62. protected:  // control bar embedded members
  63.     CProgressStatusBar        m_wndStatusBar;
  64.     CToolBar                m_wndToolBar;
  65.     CSplitter                m_wndSplitter;
  66.     CFindDifferenceDialog*    m_pFindDiffDlg;
  67.  
  68.     void OnFindNextDifference(BOOL bSearchDown, 
  69.                               BOOL bNextDifference);    
  70.  
  71. // Generated message map functions
  72. protected:
  73.     //{{AFX_MSG(CMainFrame)
  74.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  75.     afx_msg void OnDropFiles(HDROP hDropInfo);
  76.     afx_msg void OnEditFindDiff();
  77.     afx_msg void OnViewPreferences();
  78.     //}}AFX_MSG
  79.     afx_msg LRESULT OnFindDifferenceCmd (WPARAM, LPARAM lParam);
  80.     DECLARE_MESSAGE_MAP()
  81. };
  82.  
  83. /////////////////////////////////////////////////////////////////////////////
  84.