我想把复选框上的字体换一种
HBRUSH CDlgUserLogin::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
CFont *pOldFont;
pOldFont = pDC->SelectObject(&g_fontBase);
switch(pWnd->GetDlgCtrlID())
{
case IDC_CHECK_KEEP_PWD:
pDC->SetBkMode(TRANSPARENT); //复选框背景透明
pDC->SetTextColor(RGB(255,255,255));
return (HBRUSH)GetStockObject(NULL_BRUSH);
break;
default:
break;
}
pDC->SelectObject(pOldFont);
// TODO: Return a different brush if the default is not desired
return hbr;
}
我想把复选框上的字体换一种,为什么不起作用,字体我已经在其它地方设置好了。