home *** CD-ROM | disk | FTP | other *** search
/ Mastering Microsoft Visual C++ 4 (2nd Edition) / VisualC4.ISO / minidrw2 / minidrvw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-30  |  1.5 KB  |  60 lines

  1. // MiniDrVw.h : interface of the CMiniDrawView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CMiniDrawView : public CView
  6. {
  7. protected:
  8.    CString m_ClassName;
  9.    int m_Dragging;
  10.    HCURSOR m_HCross;
  11.    CPoint m_PointOld;
  12.    CPoint m_PointOrigin;
  13.  
  14. protected: // create from serialization only
  15.    CMiniDrawView();
  16.    DECLARE_DYNCREATE(CMiniDrawView)
  17.  
  18. // Attributes
  19. public:
  20.    CMiniDrawDoc* GetDocument();
  21.  
  22. // Operations
  23. public:
  24.  
  25. // Overrides
  26.    // ClassWizard generated virtual function overrides
  27.    //{{AFX_VIRTUAL(CMiniDrawView)
  28.    public:
  29.    virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  30.    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  31.    protected:
  32.    //}}AFX_VIRTUAL
  33.  
  34. // Implementation
  35. public:
  36.    virtual ~CMiniDrawView();
  37. #ifdef _DEBUG
  38.    virtual void AssertValid() const;
  39.    virtual void Dump(CDumpContext& dc) const;
  40. #endif
  41.  
  42. protected:
  43.  
  44. // Generated message map functions
  45. protected:
  46.    //{{AFX_MSG(CMiniDrawView)
  47.    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  48.    afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  49.    afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  50.    //}}AFX_MSG
  51.    DECLARE_MESSAGE_MAP()
  52. };
  53.  
  54. #ifndef _DEBUG  // debug version in MiniDrVw.cpp
  55. inline CMiniDrawDoc* CMiniDrawView::GetDocument()
  56.    { return (CMiniDrawDoc*)m_pDocument; }
  57. #endif
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60.