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

📄 csurface.h

📁 Visual C++ 游戏开发与设计实例 源代码(所有)
💻 H
字号:
// CMAIN LIB - APPLICATION AND DIRECT WRAPPER
//
// Written by Mauricio Teichmann Ritter
//
// Copyright (C) 2002, Brazil. All rights reserved.
// 
//

// cSurface.h: interface for the cSurface class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CSURFACE_H__0C439CBB_20C0_487F_84A6_31D8F436B74A__INCLUDED_)
#define AFX_CSURFACE_H__0C439CBB_20C0_487F_84A6_31D8F436B74A__INCLUDED_

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

#include "cApplication.h"

struct SURFACE_SOURCE_INFO
{
	HINSTANCE	m_hInstance;
	UINT		m_nResource;
	int			m_iX;
	int			m_iY;
	int			m_iWidth;
	int			m_iHeight;

};

class cSurface  
{

public:

	SURFACE_SOURCE_INFO m_srcInfo;
	void Restore();
	LPDIRECTDRAWSURFACE7 GetSurface();
	UINT Width();
	UINT Height();
	void Destroy();
	COLORREF m_ColorKey;
	BOOL Draw(LPDIRECTDRAWSURFACE7 lpDest, int iDestX = 0, int iDestY = 0, int iSrcX = 0, int iSrcY = 0, int nWidth = 0, int nHeight = 0);
	BOOL Create(int nWidth, int nHeight, COLORREF dwColorKey = -1);
	BOOL LoadBitmap(HINSTANCE hInst, UINT nRes, int nX = 0, int nY = 0, int nWidth = 0, int nHeight = 0);
	cSurface(HINSTANCE hInst, UINT nResource, int nWidth, int nHeight, COLORREF dwColorKey = -1);
	cSurface();
	virtual ~cSurface();

protected:
	UINT m_Height;
	UINT m_Width;

	LPDIRECTDRAWSURFACE7 m_pSurface;
};

#endif // !defined(AFX_CSURFACE_H__0C439CBB_20C0_487F_84A6_31D8F436B74A__INCLUDED_)

⌨️ 快捷键说明

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