stringinfoview.cpp

来自「网络游戏魔域源代码 测试可以完整变异」· C++ 代码 · 共 52 行

CPP
52
字号
// StringInfoView.cpp: implementation of the CStringInfoView class.
//
//////////////////////////////////////////////////////////////////////

#include "StringInfoView.h"
#include "ND_BITMAP.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CStringInfoView::CStringInfoView()
{
	
}

CStringInfoView::~CStringInfoView()
{
	
}


//-------------------------------------------------------------------
CStringInfoView* CStringInfoView::CreateNew(char* pszStr, CMyPos posShow, DWORD dwColor)
{
	// char string
	CStringInfoView* pView = new CStringInfoView;
	MYASSERT(pView);
	if(pView->Create(pszStr, posShow, dwColor))
		return pView;
	SAFE_DELETE(pView);
	return NULL;
}
//-------------------------------------------------------------------
void CStringInfoView::Show()
{
	CMyBitmap::ShowString(m_posShow.x, m_posShow.y, m_dwColor, m_szStr);
}

//-------------------------------------------------------------------
BOOL CStringInfoView::Create(char* pszStr, CMyPos posShow, DWORD dwColor)
{
	if(!pszStr || strlen(pszStr) >= _MAX_STRING)
		return false;
	strcpy(m_szStr, pszStr);
	m_posShow.x	= 	posShow.x;
	m_posShow.y	= 	posShow.y;
	m_dwColor = dwColor;
	return true;
}
//-------------------------------------------------------------------

⌨️ 快捷键说明

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