?? 45mapmakerview.h
字號:
// 45MapMakerView.h : interface of the CMy45MapMakerView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_45MAPMAKERVIEW_H__D2C16E74_0152_4647_A547_47D8E58FC3BE__INCLUDED_)
#define AFX_45MAPMAKERVIEW_H__D2C16E74_0152_4647_A547_47D8E58FC3BE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include ".\src\dxutil.h"
#include ".\src\ddutil.h"
#include "45MapMakerDoc.h"
#define DDRAW_WIDTH 1046
#define DDRAW_HEIGHT 687
class CMy45MapMakerView : public CView
{
protected: // create from serialization only
CMy45MapMakerView();
DECLARE_DYNCREATE(CMy45MapMakerView)
// Attributes
public:
HRESULT InitDirectDraw(HWND hWnd ); //創建DirectDraw
CMy45MapMakerDoc* GetDocument();
void DrawFront(CRect* rt); //畫地表
void DrawSecond(CRect* rt); //畫建筑物
void DrawProject(CRect* rt);
void DrawObject();
int mouse;
// Operations
public:
CSurface* test;
int mapWidth,mapHeight;//地圖的寬度和高度,基本單位是圖塊的寬高度
int mapBeginx,mapBeginy;//顯示地圖的開始位置
int tileWidth,tileHeight;//地圖Tile的寬度和高度
int editarry; //選擇要修改的數組位置
int editx,edity;
int curBeginx,curBeginy;//選擇模式下面的起點位置
int curEndx,curEndy;//選擇模式下面的終點位置
bool brushed; //畫刷
////////////////////////MapClubDlg///////////////////////////
bool ViewEditSecond; //察看前景圖塊中心點
bool viewFront;
bool viewSecond;
bool viewBlock;
bool editMode; //true表示畫刷模式,false表示選擇模式
bool editFront;
bool editSecond;
bool editBlock;
bool viewNet; //察看網格
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy45MapMakerView)
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 ~CMy45MapMakerView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMy45MapMakerView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
// afx_msg void OnFileNew();
protected:
virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
public:
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnViewfront();
afx_msg void OnUpdateViewfront(CCmdUI *pCmdUI);
afx_msg void OnViewsecond();
afx_msg void OnUpdateViewsecond(CCmdUI *pCmdUI);
afx_msg void OnViewblock();
afx_msg void OnUpdateViewblock(CCmdUI *pCmdUI);
afx_msg void OnViewnet();
afx_msg void OnUpdateViewnet(CCmdUI *pCmdUI);
afx_msg void OnEditfront();
afx_msg void OnEditsecond();
afx_msg void OnEditblock();
afx_msg void OnUpdateEditfront(CCmdUI *pCmdUI);
afx_msg void OnUpdateEditsecond(CCmdUI *pCmdUI);
afx_msg void OnUpdateEditblock(CCmdUI *pCmdUI);
afx_msg void OnSelectmode();
afx_msg void OnBrushmode();
afx_msg void OnUpdateSelectmode(CCmdUI *pCmdUI);
afx_msg void OnUpdateBrushmode(CCmdUI *pCmdUI);
afx_msg void OnViewsecondtarg();
afx_msg void OnUpdateViewsecondtarg(CCmdUI *pCmdUI);
};
#ifndef _DEBUG // debug version in 45MapMakerView.cpp
inline CMy45MapMakerDoc* CMy45MapMakerView::GetDocument()
{ return (CMy45MapMakerDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_45MAPMAKERVIEW_H__D2C16E74_0152_4647_A547_47D8E58FC3BE__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -