CEdit transparency
I want to have a transparent CEdit control. I derive from CEdit, here are snippets of my code:
BEGIN_MESSAGE_MAP(CEditEx, CEdit)
ON_WM_CTLCOLOR_REFLECT()
END_MESSAGE_MAP()
HBRUSH CEditEx::CtlColor(CDC* pDC, UINT nCtlColor)
{
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(m_bHasFocus?m_clrTextFocus:m_clrText);
return (HBRUSH)GetStockObject(NULL_BRUSH);
}
The control is transparent, but it doesn't get updated when it changes (for example after writing something and then trying to erase it with backspace). How do I get it updated, am I missing something? When I turn off the transparency and set a regular background color with a solid brush, everything works fine.
Thanks.

