相应WM_CTLCOLOR函数
添加以下代码:
HBRUSH CMFCApplication2Dlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { .....
switch (pWnd->GetDlgCtrlID()) { case IDC_STATIC: { pDC->SetBkMode(TRANSPARENT); pDC->SetTextColor(RGB(0, 0, 0)); return (HBRUSH)GetStockObject(HOLLOW_BRUSH); } default: break; }
return hbr; }
好就此搞定!
时间: 2024-11-05 21:34:37