关于EDIT控件透明的问题!!!!!!!!!!!!!!!!

来源:互联网 发布:mysql从零开始学博客 编辑:程序博客网 时间:2024/05/22 17:22
重写EDIT控件类
HBRUSH CHotEdit::CtlColor(CDC* pDC, UINT nCtlColor) 
{


// TODO: Return a non-NULL brush if the parent's handler should not be called

//set text color
pDC->SetTextColor(m_crText);
pDC-> SetBkMode(TRANSPARENT);
CBrush brush;
brush.CreateStockObject(NULL_BRUSH); 
return brush;


}
这样能做到控件透明,但是控件不能自动刷新,请问该怎么做???
比如先用setwinowtext设定EDIT的值,然后再setwinowtext设一个值,前面那个值没有自动清掉,请问有什么好的办法吗???
0 0