views:

256

answers:

3

Objective: use the standard Win32 MonthCal control, and paint days such as holidays in RED.

It seems like the Win32's native approach would be use the MCN_GETDAYSTATE notification, which seems to allow only painting specific days in Bold.

Possible (but declined) solution would be to write my own painted-at-will MonthCalendar, driving myself right out of the theme support - meaning that chances are my control will not be UI consistent when newer themes are out there.

If anyone have come across this issue, a solution would be much appreciated.

A: 

Can't be done. That control only supports showing some days in bold.

What platform are you targeting (desktop or WM?) If desktop, is it really win32 or is an MFC solution acceptable?

Roel
A: 

The platform is definitely desktop. Can't see the difference between win32 and MFC though. Or, to be more precise, between my app and MFC. Either it uses native Win32, or it makes its own control. What do I miss out?

Anyway, the application is not MFC based, so MFC solution would be acceptable if I get to see the source code :)

gnosis
+1  A: 

Well if your application doesn't use any MFC, but is written in pure win32 calls, an MFC control to do what you want is out of the question. So you can make a control with MFC or with win32 - obviously the MFC control will use win32 under the hood but 15 years of Windows developer convention says that when someone talks about a 'win32 control', it's a control that 'only uses win32 calls, no external libraries' and an 'MFC control' is 'a control that directly or indirectly derives from CWnd and uses the MFC classes and usage patterns'.

Anyway, look at http://www.bcgsoft.com/samples/calendar.htm. They have a control in their UI suite that looks like the MonthCal control, but where you can indicate date ranges etc. with colors.

Roel