I handle WM_CTLCOLORSTATIC message to make transparent background for static control:
case WM_CTLCOLORSTATIC:
{
SetTextColor((HDC)wParam,RGB(0,0,0));
SetBkMode((HDC)wParam,TRANSPARENT);
HBRUSH return_bush = (HBRUSH)GetStockObject(NULL_BRUSH);
return (LRESULT)return_brush;
}
This works fine. And now I try to change text for static control by calling SendMessage(). But in result new text is placed over the existing text. I think that need to repaint static control. How to repaint static control? How to do it?