1》。初始化:
(CBrush)m_brush.CreateSolidBrush(RGB(255, 0, 0));
2》。
HBRUSH CxxxxDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if (pWnd->GetDlgCtrlID() == IDC_GROUP)//m_Group
{
// Set the text color to white
pDC->SetTextColor(RGB(255,255, 255));
CRect rc;
m_Group.GetClientRect(&rc);
pDC->FillSolidRect(rc,RGB(0,255,255));//green
// Set the background mode for text to transparent
// so background will show thru.
pDC->SetBkMode(TRANSPARENT
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。