www.pudn.com > DrawVector.rar > DrawView.h


// DrawView.h : interface of the CDrawView class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_DRAWVIEW_H__F97AE282_04B1_42CB_AB23_3F1476AF04D7__INCLUDED_) 
#define AFX_DRAWVIEW_H__F97AE282_04B1_42CB_AB23_3F1476AF04D7__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "Arc.h" 
#include "TextWriteDlg.h" 
#include "DrawDoc.h" 
class CDrawView : public CView 
{ 
private: 
	float m_xStart,m_yStart,blc; 
	int m_wScreen,m_hScreen; 
	int m_bColor; 
	int m_MapMode; 
	int r; 
	float m_CircleX,m_CircleY,m_CircleR,m_Angle1,m_Angle2; 
	CArc m_Arc1; 
	BOOL DrawArcYes; 
	PointStruct *PointXyz; 
	ScreenStruct *p_Screen; 
	float x_Move,y_Move; 
 
	CPoint mPointOrign,mPointOrign1,mPointOld;//记录鼠标移动时的鼠标点的坐标; 
	short m_pColor; 
//	short m_bColor; 
	short m_brColor; 
	short m_LineWide; 
	short m_LineType; 
	short m_Layer; 
	void ReDrawRect(float X1,float Y1,float X2,float Y2); 
	BOOL RectCross(float* x1,float* y1,float* x2,float* y2,float xx1,float yy1,float xx2,float yy2); 
protected: // create from serialization only 
	int m_DrawCurrent; 
	int PushNumb; 
	CDrawView(); 
	DECLARE_DYNCREATE(CDrawView) 
	BOOL jsarc(CPoint p1,CPoint p2,CPoint p3,float *CircleX,float *CircleY,float *CircleR,float *Angle1,float *Angle2); 
	TextWriteDlg* pTextDlg;//标注文本的对话框类指针 
	float m_FontHeight,m_FontWide,m_FontBetween,m_TextAngle,m_FontAngle; 
	float m_TextX,m_TextY;//标注文本的起点位置 
	CString m_TextString; 
	CText* m_Text1;//定义一个标注文本类指针 
 
// Attributes 
public: 
	CDrawDoc* GetDocument(); 
	void DPtoVP(float x,float y,int *X,int *Y); 
	void VPtoDP(int x,int y,float *X,float *Y); 
	int DLtoVL(float l); 
	float VLtoDL(int l); 
    void DrawBack(CDC* pDC); 
	//在视图类中任意给一个指定的图形元素做删除标志 
	void Delete(CDC* pDC,int Lb,int index); 
 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CDrawView) 
	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); 
	virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); 
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	virtual ~CDrawView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CDrawView) 
	afx_msg void OnSize(UINT nType, int cx,int cy); 
    afx_msg void OnMouseMove(UINT nFlags, CPoint point); 
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnDrawArc(); 
	afx_msg void OnDrawCircle(); 
	afx_msg void OnDrawCircle1(); 
	afx_msg void OnDrawLine(); 
	afx_msg void OnDrawPline(); 
    afx_msg void OnDrawPlineRgn(); 
	afx_msg void OnDrawText(); 
	afx_msg void OnDrawNet(); 
	afx_msg void OnDrawNetLink(); 
	afx_msg void DrawText(); 
	afx_msg void DrawTextOnOk(); 
	afx_msg void DrawTextOnCancel(); 
	afx_msg void OnGraphRedraw(); 
	afx_msg void OnGraphZoom(); 
	afx_msg void OnGraphPan(); 
	afx_msg void OnGraphUp(); 
	afx_msg void OnGraphFirst(); 
	afx_msg void OnGraphAll(); 
	afx_msg void OnSelectMouse(); 
	afx_msg void OnSelectClear(); 
	afx_msg void OnEditMove(); 
	afx_msg void OnSelectDelete(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
#ifndef _DEBUG  // debug version in DrawView.cpp 
inline CDrawDoc* CDrawView::GetDocument() 
   { return (CDrawDoc*)m_pDocument; } 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_DRAWVIEW_H__F97AE282_04B1_42CB_AB23_3F1476AF04D7__INCLUDED_) 
//extern CGraphPara *p_GraphPara;