home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c07 / form / formview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.7 KB  |  68 lines

  1. // FormView.h : interface of the CMyFormView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CMyFormView : public CFormView
  6. {
  7. protected: // create from serialization only
  8.     CMyFormView();
  9.     DECLARE_DYNCREATE(CMyFormView)
  10.  
  11. public:
  12.     //{{AFX_DATA(CMyFormView)
  13.     enum { IDD = IDD_FORM_FORM };
  14.     CString    m_dlgPhrase;
  15.     BOOL    m_blue;
  16.     BOOL    m_green;
  17.     BOOL    m_red;
  18.     //}}AFX_DATA
  19.  
  20. // Attributes
  21. public:
  22.     CFormDoc* GetDocument();
  23.  
  24. // Operations
  25. public:
  26.  
  27. // Overrides
  28.     // ClassWizard generated virtual function overrides
  29.     //{{AFX_VIRTUAL(CMyFormView)
  30.     public:
  31.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  32.     virtual void OnInitialUpdate();
  33.     protected:
  34.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  35.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  36.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  37.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  38.     virtual void OnPrint(CDC* pDC, CPrintInfo*);
  39.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  40.     //}}AFX_VIRTUAL
  41.  
  42. // Implementation
  43. public:
  44.     virtual ~CMyFormView();
  45. #ifdef _DEBUG
  46.     virtual void AssertValid() const;
  47.     virtual void Dump(CDumpContext& dc) const;
  48. #endif
  49.  
  50. protected:
  51.  
  52. // Generated message map functions
  53. protected:
  54.     //{{AFX_MSG(CMyFormView)
  55.     afx_msg void OnChangeWelcome();
  56.     afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  57.     //}}AFX_MSG
  58.     DECLARE_MESSAGE_MAP()
  59.     afx_msg void OnColor(UINT nID);
  60. };
  61.  
  62. #ifndef _DEBUG  // debug version in FormView.cpp
  63. inline CFormDoc* CMyFormView::GetDocument()
  64.    { return (CFormDoc*)m_pDocument; }
  65. #endif
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68.