使用C/C++在VC6下编写简单串口通信程序
3 回答
慕仙森
TA贡献1827条经验 获得超7个赞
在主窗口里响应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 关注
- 973 浏览
添加回答
举报
0/150
提交
取消