www.pudn.com > MyCAD.rar > MyCADView.h
// MyCADView.h : interface of the CMyCADView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYCADVIEW_H__E90CA098_7EA6_4C88_9C72_B84283565FA3__INCLUDED_)
#define AFX_MYCADVIEW_H__E90CA098_7EA6_4C88_9C72_B84283565FA3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// 自定义消息
#define WM_MY_MESSAGE (WM_USER + 1)
class CMyCADView : public CView
{
protected: // create from serialization only
CMyCADView();
DECLARE_DYNCREATE(CMyCADView)
// Attributes
public:
CMyCADDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyCADView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
COLORREF m_LineColor;
int m_nLineStyle;
int m_nLineWidth;
int m_nStep;
int m_nStartY;
int m_nStartX;
BOOL m_bIsLine;
BOOL m_bIsPoint;
virtual ~CMyCADView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
afx_msg void OnContextMenu(CWnd*, CPoint point);
//{{AFX_MSG(CMyCADView)
afx_msg void OnGraphPoint();
afx_msg void OnUpdateGraphPoint(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSetLinewidth();
afx_msg void OnSetColor();
//}}AFX_MSG
// 为画线菜单项手动添加消息处理函数
afx_msg void OnGraphLine();
afx_msg void CMyCADView::OnUpdateGraphLine(CCmdUI* pCmdUI);
// 声明自定义消息的消息处理函数
afx_msg LRESULT OnMyMessage(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in MyCADView.cpp
inline CMyCADDoc* CMyCADView::GetDocument()
{ return (CMyCADDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYCADVIEW_H__E90CA098_7EA6_4C88_9C72_B84283565FA3__INCLUDED_)