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

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