📄 drawshapeview.h
字号:
// DrawShapeView.h : interface of the CDrawShapeView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_DRAWSHAPEVIEW_H__06D55840_0F38_4758_9475_B9B9E22B370E__INCLUDED_)
#define AFX_DRAWSHAPEVIEW_H__06D55840_0F38_4758_9475_B9B9E22B370E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Pline.h"
class CDrawShapeDoc;
class CDrawShapeView : public CView
{
protected: // create from serialization only
CDrawShapeView();
DECLARE_DYNCREATE(CDrawShapeView)
// Attributes
public:
CDrawShapeDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDrawShapeView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
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);
//}}AFX_VIRTUAL
// Implementation
public:
void GetMapBound(float& a_Xmin, float& a_Ymin, float& a_Xmax, float& a_Ymax);
void GetGraphBound(float& Xmin,float& Ymin,float& Xmax, float& Ymax);
void ShowFullScreen();
void Move(float a_fXcoord,float a_fYcoord);
void Get(int ab);
void GetAppPath();
// static void OutPutX(int x);
void LPtoAP(int x,int y,float* X,float* Y);
void APtoLP(float x,float y,int* X,int* Y);
float LVtoAV(int a_iInputval);
int AVtoLV(float a_fInputval);
virtual ~CDrawShapeView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
PointStruct* m_PointArray; //多边形区域或连续直线点数组(实际坐标)
CString PathName;
int m_DrawType;
int m_PushNum;
POINT m_PointOrg;
POINT m_PointOld;
POINT m_PointMouse;
short m_LineType;
short m_LineWide;
short m_ColorPen;
short m_ColorBrush;
short m_Color;
BOOL m_bDelete;
short m_Layer;
CBitmap m_MemBitmap;
bool IsFirst ; //控制兼容位图的创建只是每次新文档开始时
bool IsFirstFill;
int iNewX ; //位图拷贝到的新位置起点
int iNewY;
// Generated message map functions
//{{AFX_MSG(CDrawShapeView)
afx_msg void OnUpdateIndicatorX(CCmdUI* pCmdUI);
afx_msg void OnUpdateIndicatorY(CCmdUI* pCmdUI);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnTestDraw();
afx_msg void OnDrawLine();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnDrawPolyline();
afx_msg void OnDrawPolygon();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnViewZoomin();
afx_msg void OnViewZoomout();
afx_msg void OnViewZoomrect();
afx_msg void OnViewMove();
afx_msg void OnViewFullscreen();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnFileImport();
afx_msg void OnDrawPoint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
float m_xStart,m_yStart,blc; //绘制图形时的起点坐标和比例尺
int m_hScreen,m_wScreen; //当前视图的高度和宽度
int m_MapMode; //绘图模式
HCURSOR hHandCursor, hZoominCursor, hZoomoutCursor;
int iWScreen,iHScreen;
int m_XminIntersect,m_YminIntersect,m_XmaxIntersect,m_YmaxIntersect; //与屏幕相交的地图边界坐标
};
#ifndef _DEBUG // debug version in DrawShapeView.cpp
inline CDrawShapeDoc* CDrawShapeView::GetDocument()
{ return (CDrawShapeDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DRAWSHAPEVIEW_H__06D55840_0F38_4758_9475_B9B9E22B370E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -