简体   繁体   中英

How to make CDateTimeCtrl have a string as default value?

I am using MFC CDateTimeCtrl in VS2010. It seems it always has a datetime value showed, default one is today. I want sort of customizing it. Would it be possible that to make it show a string say "no date selected" when it shows up first time? After that, when the end user picks up a date, show the corresponding date.

Thanks

基础控件支持“无值”,但显示一个复选框,允许指定(或不指定)数据。

可能您需要创建自己的自定义控件或将CDateTimeCtrl子类化并覆盖其行为

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM