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

📄 chscharset.cpp

📁 一个更为先进的嵌入式操作系统.采用RMS线程调度算法,具有信号量等同步对象.亦包括GUI. 通过该系统您可以极大知道Windows的内部秘密.
💻 CPP
字号:
#include "gos.h"
#include "chscharset.h"

extern const FONTFACE g_fntChs;

DWORD CChsCharSet::GetCharType(DWORD nCode)
{
	if(nCode>255)
		return CHARTYPE_WORDBREAK|CHARTYPE_DBLBYTES;
	return CCharSet::GetCharType(nCode);
}

DWORD CChsCharSet::ParseText(LPCTSTR& pText)
{
	DWORD nCode=BYTE(*pText++);
	if(nCode>128)
	{
		nCode<<=8;
		nCode|=BYTE(*pText++);
		return nCode;
	}
	return nCode;
}

DWORD CChsCharSet::Translate(DWORD nCode,BOOL bToSystem)
{
	return nCode;
}

CChsFontFace::CChsFontFace()
{
	m_ff=g_fntChs;
	m_pFF=new CFontFace();
}

CChsFontFace::~CChsFontFace()
{
	delete m_pFF;
}

PBYTE CChsFontFace::FindChar(DWORD nCharCode)
{
	if(nCharCode>255)
	{
		nCharCode=((nCharCode>>8)-0xa1)*94+(nCharCode&0xff)-0xa1;
		return CFontFace::FindChar(nCharCode);
	}
	return m_pFF->FindChar(nCharCode);
}

void CChsFontFace::DrawFont(FFDRAWARG& pv)
{
	if(pv.nCharCode>255)
		CFontFace::DrawFont(pv);
	else
		m_pFF->DrawFont(pv);
}

int CChsFontFace::GetCharWidth(DWORD nCharCode,int nSize)
{
	if(nCharCode>255)
		return CFontFace::GetCharWidth(nCharCode,nSize);
	return m_pFF->GetCharWidth(nCharCode,nSize);
}

⌨️ 快捷键说明

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