www.pudn.com > 2DCAD_duojiemian.rar > 2DCADView.h
// 2DCADView.h : interface of the CMy2DCADView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_2DCADVIEW_H__41B2A2DD_8027_4BF2_BE93_430AD51EB83B__INCLUDED_)
#define AFX_2DCADVIEW_H__41B2A2DD_8027_4BF2_BE93_430AD51EB83B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "2DCADDoc.h"
#include "UIThread.h"
class CMy2DCADView : public CView
{
protected: // create from serialization only
CMy2DCADView();
DECLARE_DYNCREATE(CMy2DCADView)
// Attributes
public:
CMy2DCADDoc *GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy2DCADView)
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:
CWinThread * m_pUIThread;
HANDLE m_hThread; //记录工作线程句柄
CWinThread * m_pThread; //记录工作线程指针
COLORREF m_nLineColor;
int m_nLineStyle;
int m_nLineWidth;
int m_nStep;
CPoint m_nEnd;
CPoint m_nStart;
virtual ~CMy2DCADView();
#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(CMy2DCADView)
afx_msg void OnGraphPoint();
afx_msg void OnGraphLine();
afx_msg void OnUpdateGraphLine(CCmdUI* pCmdUI);
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 OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSetLinewidth();
afx_msg void OnSetColor();
afx_msg void OnSetFile();
afx_msg void OnThreadSingle();
afx_msg void OnThreadWorker();
afx_msg void OnThreadUi();
afx_msg void OnThreadSuspend();
afx_msg void OnThreadResume();
afx_msg void OnThreadEvent();
//}}AFX_MSG
afx_msg LRESULT OnMyMessage(WPARAM wParam,LPARAM lParam);
DECLARE_MESSAGE_MAP()
private:
BOOL m_bIsLine;
BOOL m_bIsPoint;
};
#ifndef _DEBUG // debug version in 2DCADView.cpp
inline CMy2DCADDoc* CMy2DCADView::GetDocument()
{ return (CMy2DCADDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_2DCADVIEW_H__41B2A2DD_8027_4BF2_BE93_430AD51EB83B__INCLUDED_)