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

📄 pictureview.h

📁 画任意一个三角形
💻 H
字号:
// PictureView.h : interface of the CPictureView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_PICTUREVIEW_H__CA98BA62_8037_4B76_8868_D1060B421CBE__INCLUDED_)
#define AFX_PICTUREVIEW_H__CA98BA62_8037_4B76_8868_D1060B421CBE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CPictureView : public CView
{
protected: // create from serialization only
	CPictureView();
	DECLARE_DYNCREATE(CPictureView)

// Attributes
public:
	CPictureDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPictureView)
	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:
	virtual ~CPictureView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CPictureView)
	afx_msg void OnUpdateCircle(CCmdUI* pCmdUI);
	afx_msg void OnUpdateLine(CCmdUI* pCmdUI);
	afx_msg void OnLine();
	afx_msg void OnCircle();
	afx_msg void OnRectangle();
	afx_msg void OnUpdateRectangle(CCmdUI* pCmdUI);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnRotate();
	afx_msg void OnUpdateRotate(CCmdUI* pCmdUI);
	afx_msg void OnZoom();
	afx_msg void OnTranslate();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void Tran(int& x,int &y,int tx,int ty);
	void Zoom(int &x,int& y,double zx,double zy);
	void Rotate(int& x,int& y, int angle);
	bool bTriangle;
	bool bCircle;
	bool bLine;
	bool bDraw;
	bool bFirst;
	bool bSecond;
	bool bThird;
bool bFinish;
bool bValid;

	int x;
	int y;
	int x1;
	int y1;
	int x2;
	int y2;
};

#ifndef _DEBUG  // debug version in PictureView.cpp
inline CPictureDoc* CPictureView::GetDocument()
   { return (CPictureDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PICTUREVIEW_H__CA98BA62_8037_4B76_8868_D1060B421CBE__INCLUDED_)

⌨️ 快捷键说明

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