?? comboex.cpp
字號(hào):
// ComboEx.cpp : implementation file
//
#include "stdafx.h"
#include "24Dian.h"
#include "ComboEx.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CComboEx
CComboEx::CComboEx()
{
m_brush.CreateSolidBrush(RGB(255,255,255));
m_color=RGB(255,0,0);
}
CComboEx::~CComboEx()
{
}
BEGIN_MESSAGE_MAP(CComboEx, CComboBox)
//{{AFX_MSG_MAP(CComboEx)
ON_WM_CTLCOLOR_REFLECT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CComboEx message handlers
void CComboEx::SetFont(LOGFONT logfont)
{
m_font.DeleteObject();
m_font.CreateFontIndirect(&logfont);
CComboBox::SetFont(&m_font,FALSE);
}
void CComboEx::SetColor(COLORREF color)
{
m_color=color;
}
HBRUSH CComboEx::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
pDC->SetTextColor(m_color);
// TODO: Return a non-NULL brush if the parent's handler should not be called
return (HBRUSH)m_brush.GetSafeHandle();
// return HBRUSH(GetStockObject(HOLLOW_BRUSH));
// return NULL;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -