static.h

来自「一个自己写的游戏引擎,用DirectX 写成」· C头文件 代码 · 共 57 行

H
57
字号
//--------------------------------------------------
//  Desc: Static Text
//  Date: 2006.11.16 /update
//  Author: artsylee
//
//  Copyright (C) 2006 artsylee
//
//--------------------------------------------------

#ifndef _STATIC_
#define _STATIC_

#include "Window.h"
#include "../Core/Font.h"

class ASE_DLL GStatic : public CWindow
{
public:
	GStatic(CWindow* pParent = NULL);
	virtual ~GStatic();

	virtual void	Render();
	virtual DWORD	ProcessEvent();
	virtual bool	LoadFromIni(char* pfilename, char* pIndex);

	void	SetCaption(const char *szCaption);
	void	GetCaption(char *szCaption);

	bool	IsLeft(void)	{	return m_bLeft;	}
	void	SetLeft(bool c)	{	m_bLeft = c;	}
	GRect	GetFontRect()	{	return m_rcSrc;	}
protected:
	CSimFont	m_Font;
	bool		m_bLeft;
};

class ASE_DLL MLStatic : public CWindow
{
public:
	MLStatic(CWindow* pParent = NULL);
	virtual ~MLStatic();

	virtual void	Render();
	virtual DWORD	ProcessEvent();
	virtual bool	LoadFromIni(char* pfilename, char* pIndex);

	void	SetCaption(const char *szCaption);
	void	GetCaption(char *szCaption);
	GFont*	GetFont(void);
	GRect	GetFontRect();

protected:
	GFont	m_Font;
	char	m_szInfo[4096];
};

#endif // _STATIC_

⌨️ 快捷键说明

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