Your question is too vague.
Is your application manifested to use the V6 common controls?
What styles did you set on the control?
Don't make us guess.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi ,
Iam using CDateTimeCtrl datepicker in MFC c++ while creation it has 3D borders ,but i like to set it to normal border .How can i do so?
iam creating datepicker as
DTPicker.Create(WS_CHILD | WS_VISIBLE| DTS_UPDOWN| WS_BORDER,
CRect(400,0,400,12), this, 3);
it creates a picker control with 3D border by default i like to change the border .
Your question is too vague.
Is your application manifested to use the V6 common controls?
What styles did you set on the control?
Don't make us guess.
I suspect that your application is not manifested to use the V6 common controls. Earlier versions of the common controls will draw the datetimepicker with the 3d look.
A typical MFC application created by the Visual Studio new MFC Application template will include a #pragma directive so that the application is properly manifested for the V6 common controls.
I would include the #pragma directive but for some reason this site will not accept the text.
Hi,
According to your description, does the CDateTimeCtr display as shown below:
And if you want the CDateTimeCtr to display as shown below:
If so, I suggest you could try to enable Visual Styles.
You could add the following compiler directive to your source code:
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
For more details, I suggest you could refer to the Doc:Enabling Visual Styles.
Best Regards,
Jeanine Zhang
Its hard to tell what your issues are since using the V6 manifest should work.
I suggest you start clean with a brand new MFC dialog application created by the new project wizard. It will properly insert the V6 common control manifest. Make sure you build for UNICODE.
You should be able to instantiate a DateTimeCtrl without a 3d border in that application.