如果按你的重载重载OnCtlColor() 我这样写用什么问题吗? HBRUSH CMyButn::CtlColor(CDC* pDC, UINT nCtlColor) { // TODO: Change any attributes of the DC here if(nCtlColor==CTLCOLOR_BTN ) pDC->SetBkColor(RGB(0,0,255)); // TODO: Return a non-NULL brush if the parent's handler should not be called return NULL; } 怎么区分是哪个按钮?而且没反应,根本就没变色
什么重载CButton?
我这样写用什么问题吗?
HBRUSH CMyButn::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
if(nCtlColor==CTLCOLOR_BTN )
pDC->SetBkColor(RGB(0,0,255));
// TODO: Return a non-NULL brush if the parent's handler should not be called
return NULL;
}
怎么区分是哪个按钮?而且没反应,根本就没变色