[Proramming]/C/VC++2011. 6. 7. 14:12

[VC++]STATIC, EDIT 컨트롤 글자 색상 변경하기

[VC++]에디트컨트롤 색상 변경하기
HBRUSH CTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
 HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
 
 // TODO: Change any attributes of the DC here
 if(pWnd->GetDlgCtrlID() == IDC_STATIC_INFO)
 {
  pDC->SetTextColor(RGB(255, 0, 0));
  //pDC->SetBkColor(RGB(0, 255, 0));

 }

 // TODO: Return a different brush if the default is not desired
 return hbr;
}


Posted by nexp

댓글을 달아 주세요