Click here to Skip to main content
15,886,067 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: algorithm for an optimization problem Pin
OriginalGriff22-Oct-17 10:16
mveOriginalGriff22-Oct-17 10:16 
PraiseRe: algorithm for an optimization problem Pin
David Crow22-Oct-17 16:45
David Crow22-Oct-17 16:45 
GeneralRe: algorithm for an optimization problem Pin
Bram van Kampen22-Oct-17 17:40
Bram van Kampen22-Oct-17 17:40 
AnswerRe: algorithm for an optimization problem Pin
CPallini22-Oct-17 22:17
mveCPallini22-Oct-17 22:17 
AnswerRe: algorithm for an optimization problem Pin
jschell23-Oct-17 7:28
jschell23-Oct-17 7:28 
QuestionCMonthCalCtrlDlg and the 2038 problem Pin
Member 1345973322-Oct-17 6:13
Member 1345973322-Oct-17 6:13 
QuestionRe: CMonthCalCtrlDlg and the 2038 problem Pin
David Crow22-Oct-17 16:56
David Crow22-Oct-17 16:56 
AnswerRe: CMonthCalCtrlDlg and the 2038 problem Pin
Jochen Arndt22-Oct-17 22:45
professionalJochen Arndt22-Oct-17 22:45 
The MFC CMonthCalCtrl class is just a wrapper for the corresponding Windows system control. You might also have a look at the MFC sources (winctrl5.cpp) which are usually installed with Visual Studio. Then you will see that the class just sends messages using SYSTEMTIME parameters. The functions accepting CTime and COleDateTime parameters will convert those to SYSTEMTIME.

So you have to check the documentation for the used types:
Note

Windows does not support dates prior to 1601. See FILETIME for details.

The month-calendar control is based on the Gregorian calendar, which was introduced in 1753. It will not calculate dates that are consistent with the Julian calendar that was in use prior to 1753.

wYear

The year. The valid values for this member are 1601 through 30827.

COleDateTime uses the DATE Type | Microsoft Docs[^] internally.

For CTime see also the source (atltime.h). The oldest version I have here is VS 2003 (MSVC 7.1) which already uses __time64_t.

Result:
If you still want to use software from the last millenium to handle dates beyond 2038 you can use the CMonthCalCtrl when using only functions that accept SYSTEMTIME and COleDateTime parameters.
GeneralRe: CMonthCalCtrlDlg and the 2038 problem Pin
Member 1345973323-Oct-17 2:52
Member 1345973323-Oct-17 2:52 
QuestionC++ Queue and Stacks Pin
Member 1347847922-Oct-17 1:47
Member 1347847922-Oct-17 1:47 
AnswerRe: C++ Queue and Stacks Pin
CPallini22-Oct-17 5:02
mveCPallini22-Oct-17 5:02 
AnswerRe: C++ Queue and Stacks Pin
Richard MacCutchan22-Oct-17 11:15
mveRichard MacCutchan22-Oct-17 11:15 
AnswerRe: C++ Queue and Stacks Pin
David Crow22-Oct-17 17:02
David Crow22-Oct-17 17:02 
AnswerRe: C++ Queue and Stacks Pin
jschell23-Oct-17 7:30
jschell23-Oct-17 7:30 
QuestionFind out optimum volume for packing different boxes Pin
Member 1347639321-Oct-17 18:25
Member 1347639321-Oct-17 18:25 
AnswerRe: Find out optimum volume for packing different boxes Pin
Richard MacCutchan21-Oct-17 20:48
mveRichard MacCutchan21-Oct-17 20:48 
GeneralRe: Find out optimum volume for packing different boxes Pin
Sascha Lefèvre21-Oct-17 21:01
professionalSascha Lefèvre21-Oct-17 21:01 
AnswerRe: Find out optimum volume for packing different boxes Pin
CPallini22-Oct-17 5:07
mveCPallini22-Oct-17 5:07 
GeneralRe: Find out optimum volume for packing different boxes Pin
David Crow22-Oct-17 17:03
David Crow22-Oct-17 17:03 
QuestionCan I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 0:38
arnold_w17-Oct-17 0:38 
AnswerRe: Can I put a variable length array inside a struct somehow? Pin
Peter_in_278017-Oct-17 0:57
professionalPeter_in_278017-Oct-17 0:57 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 1:08
arnold_w17-Oct-17 1:08 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
Peter_in_278017-Oct-17 1:43
professionalPeter_in_278017-Oct-17 1:43 
AnswerRe: Can I put a variable length array inside a struct somehow? Pin
CPallini17-Oct-17 1:54
mveCPallini17-Oct-17 1:54 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 2:02
arnold_w17-Oct-17 2:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.