chat.cpp

来自「本程序是模仿QQ聊天程序」· C++ 代码 · 共 47 行

CPP
47
字号
// Chat.cpp : implementation file
//

#include "stdafx.h"
#include "QTS_QQ.h"
#include "Chat.h"

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

/////////////////////////////////////////////////////////////////////////////
// CChat

CChat::CChat()
{
	m_clrFore=RGB(0,0,255); 
	m_clrBack=RGB(255,255,255); 
	m_brush.CreateSolidBrush(m_clrBack);
}

CChat::~CChat()
{
}


BEGIN_MESSAGE_MAP(CChat, CEdit)
	//{{AFX_MSG_MAP(CChat)
	ON_WM_CTLCOLOR_REFLECT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChat message handlers

HBRUSH CChat::CtlColor(CDC* pDC, UINT nCtlColor) 
{
	// TODO: Change any attributes of the DC here
	pDC->SetTextColor(m_clrFore);
	pDC->SetBkColor(m_clrBack);	
	
	// TODO: Return a non-NULL brush if the parent's handler should not be called
	return (HBRUSH)m_brush.GetSafeHandle();
}

⌨️ 快捷键说明

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