慕尼黑的夜晚無(wú)繁華
2019-04-12 11:07:33
使用C/C++在VC6下編寫(xiě)簡(jiǎn)單串口通信程序
3 回答

慕仙森
TA貢獻(xiàn)1827條經(jīng)驗(yàn) 獲得超8個(gè)贊
在主窗口里響應(yīng)WM_CTLCOLOR消息.如果不行再HI我
HBRUSH CEdDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(IDC_EDIT1 == pWnd->GetDlgCtrlID() && nCtlColor == CTLCOLOR_EDIT)
{
COLORREF clr = RGB(0,0,0);
pDC->SetBkColor(clr);
return ::CreateSolidBrush(clr);
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
- 3 回答
- 0 關(guān)注
- 1022 瀏覽
添加回答
舉報(bào)
0/150
提交
取消