Year, Month and Date Selector enhanced

I have replaced the next and previous month buttons by 4 owner-drawn
buttons representing previous year, previous month, next year and
next month for 2 reasons:

1) pressing the right mouse button for changing the year isn't user
friendly in my opinion.

2) Default button behaviour. As it was before pressing the left mouse
button over the minus button and moving the mouse away before
releasing the button, leaves the minus button in the pressed
state.

By making the button owner-drawn, the focus rectangle can be removed
since we have to make sure that the focus is always on the window
containing the dates.

For this the treatment of the right mouse button has been removed.

Furthermore I have enhanced the keyboard treatment for next and previous day.
In case of a VK_RIGHT/VK_LEFT and the current month
stays valid, only the changed cells (previous day / current day)
need to be repainted instead of the whole window (which avoids the
annoying flicker of the window). For this the functions PreviousDay
and NextDay now return TRUE in case the month or year has changed.

I have also introduced VK_UP/VK_DOWN and VK_PRIOR/VK_NEXT (cursor
up/down, page up/down) which changed the date to the previous/next
week and the previous/next month.

The main reason why the WM_KILLFOCUS didn't work, was caused by
the use of GetParent()->EnableWindow (FALSE). This has been corrected.

To make the Control Language independent, the Months and Weekdays
array are now initialized with the local settings defined in the
Control Panel.

It is now possible to set the date before calling the DoModal()
function of the dialog including the control. This can be done
by either calling the member functions SetDay (was SetDate()),
SetMonth and SetYear or by calling the new member function
SetDate which accepts 3 integers.

Since I am using Visual C++ 4.2 I alse replaced the false constants
by FALSE.

mfc42ud.lib error due to Unicode setting

The linking error with mfc42ud.lib is seen when the project is compiled without installing Unicode libraries.

Compile without Unicode
Remove _UNICODE from the preprocessor defenition, Remove wWinMainCRTStartup from the startup symbol. Replace wcsncpy with strncpy in the code.
It should now compile without Unicode.

Year, Month and Date Selector enhanced

I use two Selector buttons controls in my dialog.
On selecting the first button with the keybord and after closing the calender window the focus (dotted
rectangle in the key) and the marker for activ key (black rectangle around the key) remains on the selected
button (that's OK). But after moving the focus to the second Selector button and selecting a new date the
focus goes back to the first Selector button (!) and the selected key marker remains on the second button.
What is going wrong?

Top White Papers and Webcasts

The 2014 State of DevOps Report — based on a survey of 9,200+ people in IT operations, software development and technology management roles in 110 countries — reveals:
Companies with high-performing IT organizations are twice as likely to exceed their profitability, market share and productivity goals.
IT performance improves with DevOps maturity, and strongly correlates with well-known DevOps practices.
Job satisfaction is the No. 1 predictor of performance against organizational …