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

📄 gstext.h

📁 连连看这个游戏都玩过吧
💻 H
字号:
// GsText.h: interface for the CGsText class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GSTEXT_H__91C6CFCD_9341_4382_B347_9B79909A1C7D__INCLUDED_)
#define AFX_GSTEXT_H__91C6CFCD_9341_4382_B347_9B79909A1C7D__INCLUDED_

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

typedef std::vector<std::string>	t_text_segment;
typedef std::vector<t_text_segment> t_text;


class GSLIB_API CGsText  
{
	HFONT	m_text_font;
	BYTE	m_word_flag_height;
	BYTE	m_word_flag_low;
	DWORD	m_text_width;
	DWORD	m_text_height;
	DWORD	m_table_size;
	t_text	m_text;
public:
	CGsText();
	virtual ~CGsText();

	//设置双字节文字的判断准则
	//如: 中文GB:		word_flag_low = 0xA1, word_flag_hight = 0xA1
	//	  中文BIG5:		word_flag_low = 0xA1, word_flag_hight = 0xA1
	VOID SetLanguage(BYTE word_flag_hight = 0xA1, BYTE word_flag_low = 0xA1);
	//设置段落缩进
	VOID SetTabSize(DWORD table_size);
	//设置限制输出尺寸,以进行换行等处理
	VOID SetWrapText(DWORD width, DWORD height);
	//插入一段文本
	VOID InsertSegment(DWORD segment, char* format,...);
	//删除一段文本
	VOID DeleteSegment(DWORD segment);
	//清除
	VOID Cleanup();

	DWORD GetSegmentCount();
	DWORD GetLineCount();
	DWORD GetWordCount();
	DWORD GetSize();

	//
	VOID Import(GSFBUF& gsbuf, DWORD size);
	DWORD export(GSFBUF& gsbuf);

	

protected:
	int	TestWord(int pos_char);

};



#endif // !defined(AFX_GSTEXT_H__91C6CFCD_9341_4382_B347_9B79909A1C7D__INCLUDED_)

⌨️ 快捷键说明

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