• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

How do you set the MCS_DAYSTATE style on a CMonthCalCtrl that's created from CDateTimeCtrl

I'm creating a C++ application in Visual Studio 2010 the will run on Windows Server 2008.  My Google search came up with a link to your site, as having an answer to the issue with adding the MCS_DAYSTATE style on the CMonthCalCtrl control when it's created from the dropdown date time control CDateTimeCtrl.  The link said Microsoft created a new function in Visual Studio 2008 called SetMonthCalStyle() to set the said style above as the calendar control is being created when it's dropdown from CDateTimeCtrl. So, my question is how do you set the MCS_DAYSTATE style on the CMonthCalCtrl control class that is created by the CDateTimeCtrl control class?

...Peter
0
Peter Voytershark
Asked:
Peter Voytershark
1 Solution
 
sarabandeCommented:
after I set my mfc project to use UNICODE strings the following compiled:

CDateTimeCtrl dt;
dt.SetMonthCalStyle(MCS_DAYSTATE);

Open in new window


Sara
0
 
Peter VoytersharkSenior Applications DeveloperAuthor Commented:
I'm converting our applications to UNICODE, so the said Microsoft functionality in the CMonthCalCtrl class can be used.

...Peter
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now