is it possible just to change the text color of a CStatic control? i made a class derived from CStatic and i want to change the text color on MouseMove event i dont wanna use the paint event because i will have to use my own text wrap function and i dont wanna use that, for now i got this code:
thanksCode:HBRUSH CLabel::CtlColor(CDC* pDC, UINT nCtlColor) { CDC dc; HBRUSH brush; pDC->SetBkMode(TRANSPARENT); pDC->SelectObject(&m_font); pDC->SetTextColor(m_color); dc.CreateCompatibleDC(pDC); dc.SelectObject(&((CChateXDlg*)AfxGetMainWnd())->m_bmp); brush = (HBRUSH)::CreateSolidBrush(dc.GetPixel(24, 24)); dc.DeleteDC(); return brush; }



LinkBack URL
About LinkBacks


