HBRUSH CAssessWizard::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CPropertySheet::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
static CBrush B;
static bool bFirst = true;
if(bFirst)
{
bFirst = false;
B.CreateSolidBrush(RGB(198,150,255));
}
switch (nCtlColor)
{
case CTLCOLOR_DLG: //对话框
return (HBRUSH) B;
case CTLCOLOR_EDIT: //编辑框
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH) B;
case CTLCOLOR_LISTBOX: //列表框
break;
case CTLCOLOR_MSGBOX ://消息框
break;
case CTLCOLOR_SCROLLBAR ://滑动条
break;
case CTLCOLOR_STATIC ://静态文本框、矩形等
break;
}
return hbr;
}
{
HBRUSH hbr = CPropertySheet::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
static CBrush B;
static bool bFirst = true;
if(bFirst)
{
bFirst = false;
B.CreateSolidBrush(RGB(198,150,255));
}
switch (nCtlColor)
{
case CTLCOLOR_DLG: //对话框
return (HBRUSH) B;
case CTLCOLOR_EDIT: //编辑框
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH) B;
case CTLCOLOR_LISTBOX: //列表框
break;
case CTLCOLOR_MSGBOX ://消息框
break;
case CTLCOLOR_SCROLLBAR ://滑动条
break;
case CTLCOLOR_STATIC ://静态文本框、矩形等
break;
}
return hbr;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货