?? draw1view.h
字號:
// DRAW1View.h : interface of the CDRAW1View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_DRAW1VIEW_H__32FB6238_91D9_41C1_BF34_AE38EE4701DE__INCLUDED_)
#define AFX_DRAW1VIEW_H__32FB6238_91D9_41C1_BF34_AE38EE4701DE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "book.h"
#include "MainFrm.h"
class CDRAW1View : public CScrollView
{
private:
int curretHandObj; //當前手中的物品
int curretShape; //當前形狀
int currectBordarScal; //當前邊框模式
COLORREF curretColor; //當前前景色
COLORREF currectBkColor; //當前背景色
int onMore; //是否正在選擇更多前景色
CList<CShape*,CShape*&>* objectAll;//所有對象集合(鏈表)
CShape* createObject; //正在創建的對象
CShape* currectObject; //當前選擇的對象
CString currectName; //當前選擇的對象名稱
int currectState; //激活對象所處狀態(無,創建,編輯)
bool currectFill; //當前填充情況
double currectZoom; //當前放大或縮小模式
CSize currectSize; //當前窗口大小
protected: // create from serialization only
CDRAW1View();
DECLARE_DYNCREATE(CDRAW1View)
// Attributes
public:
CDRAW1Doc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDRAW1View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
virtual void OnInitialUpdate();
virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void Activation(CDC* pDC);
void FindObjByName(CString objectName);
POSITION FindThePos(CShape* shape);
CString GiveName();
long GiveID();
long ShapeCount(int type);
void SetAllObectScal();
void DrawAllObject(CDC* pDC);
void InitDC(CDC *pDC);
virtual ~CDRAW1View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
void SetPageSize(CSize size);
//{{AFX_MSG(CDRAW1View)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnImagePen();
afx_msg void OnShapeStrLine();
afx_msg void OnBorderScaleSmall();
afx_msg void OnColorBlack();
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnColorYellow();
afx_msg void OnShapeRectangle();
afx_msg void OnFillFalse();
afx_msg void OnShapeSquare();
afx_msg void OnUpdateImagePen(CCmdUI* pCmdUI);
afx_msg void OnUpdateColorBlack(CCmdUI* pCmdUI);
afx_msg void OnUpdateColorYellow(CCmdUI* pCmdUI);
afx_msg void OnUpdateBorderScaleSmall(CCmdUI* pCmdUI);
afx_msg void OnUpdateShapeRectangle(CCmdUI* pCmdUI);
afx_msg void OnUpdateFillFalse(CCmdUI* pCmdUI);
afx_msg void OnFillTrue();
afx_msg void OnUpdateFillTrue(CCmdUI* pCmdUI);
afx_msg void OnUpdateShapeSquare(CCmdUI* pCmdUI);
afx_msg void OnShapeEllipse();
afx_msg void OnUpdateShapeEllipse(CCmdUI* pCmdUI);
afx_msg void OnShapeCircle();
afx_msg void OnUpdateShapeCircle(CCmdUI* pCmdUI);
afx_msg void OnBorderScaleMiddle();
afx_msg void OnUpdateBorderScaleMiddle(CCmdUI* pCmdUI);
afx_msg void OnBorderScaleLarge();
afx_msg void OnUpdateBorderScaleLarge(CCmdUI* pCmdUI);
afx_msg void OnFileSave();
afx_msg void OnFileOpen();
afx_msg void OnColorWhite();
afx_msg void OnUpdateColorWhite(CCmdUI* pCmdUI);
afx_msg void OnColorGreen();
afx_msg void OnUpdateColorGreen(CCmdUI* pCmdUI);
afx_msg void OnColorRed();
afx_msg void OnUpdateColorRed(CCmdUI* pCmdUI);
afx_msg void OnColorBlue();
afx_msg void OnUpdateColorBlue(CCmdUI* pCmdUI);
afx_msg void OnImageZoom();
afx_msg void OnUpdateImageZoom(CCmdUI* pCmdUI);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnBkColor();
afx_msg void OnUpdateBkColor(CCmdUI* pCmdUI);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSelchangeObjNameBox();
afx_msg void OnObjDelete();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnObjNewname();
afx_msg void OnUpdateShapeStrLine(CCmdUI* pCmdUI);
afx_msg void OnColorMore();
afx_msg void OnUpdateColorMore(CCmdUI* pCmdUI);
afx_msg void OnObjMoveEast();
afx_msg void OnObjMoveWest();
afx_msg void OnObjMoveSouth();
afx_msg void OnObjMoveNorth();
afx_msg void OnObjAntic();
afx_msg void OnObjDelic();
afx_msg void OnShapeTriangle();
afx_msg void OnUpdateShapeTriangle(CCmdUI* pCmdUI);
afx_msg void OnObjLarge();
afx_msg void OnObjSmall();
afx_msg void OnObjFillHave();
afx_msg void OnObjFillNone();
afx_msg void OnObjSizeLarge();
afx_msg void OnObjSizeSmall();
afx_msg void OnObjActHave();
afx_msg void OnObjActNone();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in DRAW1View.cpp
inline CDRAW1Doc* CDRAW1View::GetDocument()
{ return (CDRAW1Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DRAW1VIEW_H__32FB6238_91D9_41C1_BF34_AE38EE4701DE__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -