中标题文件:
class CTyDate : public CDateTimeCtrl
CPP文件:
void CTyDate::PreSubclassWindow()
{
CDateTimeCtrl::PreSubclassWindow();
int n1 = 0;
n1 = SetMonthCalColor(MCSC_TITLEBK, RGB(255, 0, 0));
n1 = SetMonthCalColor(MCSC_MONTHBK, RGB(255, 0, 0));
n1 = SetMonthCalColor(MCSC_TEXT, RGB(255, 0, 0));
n1 = SetMonthCalColor(MCSC_TITLETEXT, RGB(255, 0, 0));
n1 = SetMonthCalColor(MCSC_BACKGROUND, RGB(255, 0, 0));
n1 = SetMonthCalColor(MCSC_TRAILINGTEXT, RGB(255, 0, 0));
}
i为所有者绘制此cdatetimectrl的新课程。我确保此新类是正确的,并且函数ctydate :: PresubClassWindow()已经遇到了。
I放弃使用此功能,它在Windows 10中不再起作用。我通过