• 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 Voytershark
Peter Voytershark
1 Solution
after I set my mfc project to use UNICODE strings the following compiled:

CDateTimeCtrl dt;

Open in new window

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

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