MFCCDATETIMECTRL :: SETMONTHCALCOLOR不起作用

问题描述 投票:0回答:1

中标题文件:

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中不再起作用。我通过
mfc
1个回答
0
投票
实现自定义绘制。尽管我需要编写更多代码,但最终它运行良好;

enter image description here

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.