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

📄 colorstatic.cpp

📁 演示在角色扮演游戏中如何利用人工神经网络进行智能分类的训练
💻 CPP
字号:
// ColorStatic.cpp : implementation file
//

#include "stdafx.h"
#include "ANNApp.h"
#include "ColorStatic.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CColorStatic

CColorStatic::CColorStatic()
{
	_bkColor   = GetSysColor( COLOR_BTNFACE );	
	_textColor = GetSysColor( COLOR_BTNTEXT );	
}

CColorStatic::~CColorStatic()
{
}


BEGIN_MESSAGE_MAP(CColorStatic, CStatic)
	//{{AFX_MSG_MAP(CColorStatic)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CColorStatic message handlers

void CColorStatic::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	if (IsWindowEnabled() == false)
		dc.SetTextColor(GetSysColor( COLOR_GRAYTEXT ));
	else
		dc.SetTextColor( _textColor );

	dc.SetBkColor( _bkColor );

	CString text;
	GetWindowText( text );

	CRect rect; 
	GetClientRect( &rect); 
	dc.DrawText( text, &rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE );

	// Do not call CStatic::OnPaint() for painting messages
}

⌨️ 快捷键说明

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