Re: Color changing for Text Control
Hello AliR,
I only found a way of handling this method for the Dialog, not for the Text
Control. It isn't the same, is it?
How can I code your code sample? Creating a class inherited from CStatic?
"AliR (VC++ MVP)" <AliR@online.nospam> escreveu na mensagem
news:cRKLj.2595$GE1.594@nlpi061.nbdc.sbc.com...
What you have to do is override the OnCtrlColor of the edit control, and
change the text color there.
HBRUSH CMyEdit::OnCtrlColor(CDC *pDC,CWnd *pWnd, UINT nCtlColor)
{
HBRUSH hbr = CEdit::OnCtrlColor(....);
pDC->SetTextColor(...);
return hbr;
}
AliR.
"Jeova Almeida" <jeovaalmeida@yahoo.com> wrote in message
news:uMGZHv9mIHA.1208@TK2MSFTNGP05.phx.gbl...
Hello,
On my dialog, I need to change the forecolor for one of the Text
Controls.
I've created a member variable and on MyDlg::OnInitDialog() tried
m_UserName.GetDC()->SetTextColor(RGB(255,255,255));
with no success.
How can I do it?