
CEdit for Colored font???
Well, first, I'd avoid UpdateData entirely. See my essay to this effect on my MVP Tips
site. To change the color, subclass CEdit, add an =WM_CTLCOLOR handler, and change the
background color and text color. You will also need to return a brush of the correct
background color.
in the class add a protected variable:
CBrush br;
in the constructor
br.CreateSolidBrush(RGB(rb,gb,bb));
in the OnCtlColor handler:
HBRUSH CMyEdit::CtlColor(CDC * pDC, UINT id)
{
LOGBRUSH lb;
br.GetLogBrush(&lb);
pDC->SetBkColor(lb.lbColor);
pDC->SetTextColor(RGB(rt,gt,bt));
return (HBRUSH)br;
}
joe
Quote:
>i am using updateData(FALSE) to display the values in the
>edit boxes.
>I want the text displayed of Bold type and font color to
>be different.
>how do i achieve this.
>How do i make the text to blink in my program based on
>some critical conditions.
Joseph M. Newcomer [MVP]
Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm