设置CEditView背景的有关问题
设置CEditView背景的问题
代码如下:
HBRUSH CNotePadView::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
HBRUSH hBrEdit;
hBrEdit = ::CreateSolidBrush(BkColor);
pDC-> SetTextColor(color);
pDC-> SetBkMode(TRANSPARENT);
pDC-> SetBkColor(BkColor);
return hBrEdit;
// TODO: Return a non-NULL brush if the parent 's handler should not be called
return NULL;
}
-------------
执行完了以后CEditView背景色并未改变,将窗体最小化再打开背景色才变为设置的BkColor,而且如果在改变了背景的客户区上输入文本,当输入 "Backspace "的时候,只有光标移动,字还在~请较解决方法,谢谢!!!
------解决方案--------------------
看你的说话就是刷新的问题哦..
============================================================
最新自动计时定时开关机的软件 Timer Explorer 6.0 发布
下载主页: http://www.timeearth.com
============================================================
代码如下:
HBRUSH CNotePadView::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
HBRUSH hBrEdit;
hBrEdit = ::CreateSolidBrush(BkColor);
pDC-> SetTextColor(color);
pDC-> SetBkMode(TRANSPARENT);
pDC-> SetBkColor(BkColor);
return hBrEdit;
// TODO: Return a non-NULL brush if the parent 's handler should not be called
return NULL;
}
-------------
执行完了以后CEditView背景色并未改变,将窗体最小化再打开背景色才变为设置的BkColor,而且如果在改变了背景的客户区上输入文本,当输入 "Backspace "的时候,只有光标移动,字还在~请较解决方法,谢谢!!!
------解决方案--------------------
看你的说话就是刷新的问题哦..
============================================================
最新自动计时定时开关机的软件 Timer Explorer 6.0 发布
下载主页: http://www.timeearth.com
============================================================