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

📄 laomapedtview.h

📁 RPG四大编辑器:场景/道具/角色/地图四大编辑器源代码 vc++ 6.0
💻 H
字号:
// LaoMapEdtView.h : interface of the CLaoMapEdtView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_LAOMAPEDTVIEW_H__6DA559EA_3A76_4109_A24D_022E79D93744__INCLUDED_)
#define AFX_LAOMAPEDTVIEW_H__6DA559EA_3A76_4109_A24D_022E79D93744__INCLUDED_
#include "RectList.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define _BLOCK_SIZE		16

class CLaoMapEdtView : public CScrollView
{
	enum _TYPE{_NULL, _CLOG, _LAYER};
protected: // create from serialization only
	CLaoMapEdtView();
	DECLARE_DYNCREATE(CLaoMapEdtView)

// Attributes
public:
	CLaoMapEdtDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLaoMapEdtView)
	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

// Implementation
public:
	BOOL m_bIsLoad;
	void ReleaseAllLayerRect();
	CString m_csPicName;
	CRectList *m_pLayerRect[0xff];
	WORD *m_pArray;
	long m_lBkHeight;
	long m_lBkWidth;
	CBitmap *m_pbmBackPic;
	virtual ~CLaoMapEdtView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	_TYPE m_euType;
    void RGBA_FPX_to_BGRA(BYTE* data,int width,int height);
    void BGRA_to_RGBA(BYTE* data,int width,int height);
	
// Generated message map functions
protected:
	void UnitRect(BYTE layer, WORD line, WORD s, WORD e);
	void AnalLayerRect();
	BOOL OpenBk();
	CRect *m_pLastRect;
	void DrawSelRect(CRect &rc);
	void DrawSelRect(CPoint &pt1, CPoint pt2);
	void DrawSelRect(CPoint &pt, long cx, long cy);
	CPoint m_ptStart;
	void Pos2Map(CRect &rc);
	void Pos2Map(CPoint &pt);
	BOOL m_bIsLBtDown;
	CBitmap* JPG2CBitmap(CString &filename);
	//{{AFX_MSG(CLaoMapEdtView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnLayer();
	afx_msg void OnClog();
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	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 OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in LaoMapEdtView.cpp
inline CLaoMapEdtDoc* CLaoMapEdtView::GetDocument()
   { return (CLaoMapEdtDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_LAOMAPEDTVIEW_H__6DA559EA_3A76_4109_A24D_022E79D93744__INCLUDED_)

⌨️ 快捷键说明

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