⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geditorview.h

📁 一个复杂的画图系统
💻 H
字号:
// geditorView.h : interface of the CGeditorView class///////////////////////////////////////////////////////////////////////////////#if !defined(AFX_GEDITORVIEW_H__F0FB63ED_F735_11D2_B2E0_A1874FE1ADE4__INCLUDED_)#define AFX_GEDITORVIEW_H__F0FB63ED_F735_11D2_B2E0_A1874FE1ADE4__INCLUDED_#if _MSC_VER >= 1000#pragma once#endif // _MSC_VER >= 1000#include "Line.h"#include "Polygon.h"#include "MyRect.h"#include "Ellipse.h"#include "Bezier.h"
#include "text.h"#include "geditorDoc.h"
#include "prop.h"class CGeditorView : public CScrollView{protected: // create from serialization only	CGeditorView();	DECLARE_DYNCREATE(CGeditorView)// Attributesprotected:	HCURSOR	m_hCrossCursor;		//Handle of cross cursor.	WORD m_wLButtonState; /*Record the present left button state.							Its value is LBUTTONUP/LBUTTONDOWN */	CLine   * m_pCurLine; //Record the current line.	CPolygon* m_pCurPgn; //Record the current polygon.	CMyRect * m_pCurRect; //Record the current rectangle.	CEllipse* m_pCurEllipse; //Record the current elllipse.	CBezier * m_pCurBezier;  //Record the current bezier curve.
	FillPat * m_fill;
	CText   * m_text;
	CPoint	m_tAnchorPt;  //Used when inserting a rectangle.
	CPoint	m_tPrevPt;	//Used when inserting a rectangle or a polygon.
	CPoint  RotPt;
	CPoint  polypt;	WORD		m_wBezierIndex; 						//Indicate which control point has just been inserted.
public:	CGeditorDoc* GetDocument(); 
    int MoveFlag,DragMode,rotatebaseptflag;
	int objnumber;//current obj number
	char nanum[2];
	TCHAR objtype;//for copy and paste;
	BOOL NoMove;
	BOOL MouseDown;
	CShape *CurObj,*NextObj,*TempObj;// Operationspublic:// Overrides	// ClassWizard generated virtual function overrides	//{{AFX_VIRTUAL(CGeditorView)	public:	virtual void OnDraw(CDC* pDC);  // overridden to draw this view	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);	protected:	virtual void OnInitialUpdate(); // called first time after construct	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);	//}}AFX_VIRTUAL// Implementationpublic:	void setFocus();
	void killFocus();
	void DeleteObj(int index);
	void OnUpdateToolles(CCmdUI* pCmdUI);
	void OnToolLes(UINT nID);
	void SetPropChange(int styles); //注:将界面的各控件随图元改变
//	void FillingWindow(CDC* pDC,CPoint& pt);	virtual ~CGeditorView();#ifdef _DEBUG	virtual void AssertValid() const;	virtual void Dump(CDumpContext& dc) const;#endifprotected:// Generated message map functionsprotected:	//{{AFX_MSG(CGeditorView)	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnToolType(UINT nID);
	afx_msg void OnUpdateToolType(CCmdUI* pCmdUI);
	afx_msg void OnEditCut();
	afx_msg void OnEditCopy();
	afx_msg void OnEditPaste();
	afx_msg void OnColor();
	afx_msg void OnUse();
	afx_msg void OnRadsolid();
	afx_msg void OnRaddot();
	afx_msg void OnRaddashdotdot();
	afx_msg void OnRaddashdot();
	afx_msg void OnRaddash();
	afx_msg void OnSelendokObjname();
	afx_msg void OnBkcolor();
	afx_msg void OnChkfill();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()};#ifndef _DEBUG  // debug version in geditorView.cppinline CGeditorDoc* CGeditorView::GetDocument()   { return (CGeditorDoc*)m_pDocument; }#endif///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}// Microsoft Developer Studio will insert additional declarations immediately before the previous line.#endif // !defined(AFX_GEDITORVIEW_H__F0FB63ED_F735_11D2_B2E0_A1874FE1ADE4__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -