新手关于按钮的问题
我想改变一个按钮的颜色:
HBRUSH test::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
CBrush cRedBrush;
cRedBrush.CreateSolidBrush(RGB(255,0,0));
// TODO: Return a non-NULL brush if the parent's handler should not be called
return (HBRUSH)cRedBrush;
}
这样的不行吗??
这个函数需要调用吗?在哪调用?
并且这么消息是在哪产生的呀!
还有CDC …*pDC= Getdc();到底应该怎么用呀,或者说到底应该在哪里用,并且怎么确定它返回的是按钮的DC还是其他的DC呀!!
在这个函数有必要对nCtlColor进行判断吗??
还有invaliable();UpdateData(),有什么区别吗??
问题多了点。