Click here to Skip to main content
15,919,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Arrow Keys Pin
palbano16-Jun-04 12:02
palbano16-Jun-04 12:02 
GeneralRe: C++ Arrow Keys Pin
c. s.16-Jun-04 22:00
c. s.16-Jun-04 22:00 
GeneralRe: C++ Arrow Keys Pin
Roger Allen16-Jun-04 22:24
Roger Allen16-Jun-04 22:24 
QuestionTB_ADDSTRING example? Pin
LukeV16-Jun-04 10:48
LukeV16-Jun-04 10:48 
AnswerRe: TB_ADDSTRING example? Pin
palbano16-Jun-04 11:12
palbano16-Jun-04 11:12 
GeneralRe: TB_ADDSTRING example? Pin
LukeV16-Jun-04 13:01
LukeV16-Jun-04 13:01 
AnswerRe: TB_ADDSTRING example? Pin
Michael Dunn16-Jun-04 20:07
sitebuilderMichael Dunn16-Jun-04 20:07 
GeneralVSS Alternative Pin
Swinefeaster16-Jun-04 10:30
Swinefeaster16-Jun-04 10:30 
GeneralRe: VSS Alternative Pin
Ravi Bhavnani16-Jun-04 10:34
professionalRavi Bhavnani16-Jun-04 10:34 
GeneralRe: VSS Alternative Pin
Swinefeaster16-Jun-04 10:43
Swinefeaster16-Jun-04 10:43 
GeneralRe: VSS Alternative Pin
Tim Smith16-Jun-04 16:38
Tim Smith16-Jun-04 16:38 
GeneralLNK2005 problem Pin
Kam_Cheung16-Jun-04 9:40
Kam_Cheung16-Jun-04 9:40 
GeneralRe: LNK2005 problem Pin
Gary R. Wheeler16-Jun-04 14:22
Gary R. Wheeler16-Jun-04 14:22 
GeneralRe: LNK2005 problem Pin
Kam_Cheung16-Jun-04 15:19
Kam_Cheung16-Jun-04 15:19 
GeneralCDateTimeCtrl Pin
sschilachi16-Jun-04 9:08
sschilachi16-Jun-04 9:08 
GeneralRe: CDateTimeCtrl Pin
David Crow16-Jun-04 9:21
David Crow16-Jun-04 9:21 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 9:37
sschilachi16-Jun-04 9:37 
GeneralRe: CDateTimeCtrl Pin
David Crow16-Jun-04 9:45
David Crow16-Jun-04 9:45 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 10:53
sschilachi16-Jun-04 10:53 
GeneralRe: CDateTimeCtrl Pin
David Crow16-Jun-04 11:07
David Crow16-Jun-04 11:07 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 11:16
sschilachi16-Jun-04 11:16 
I know that, I am using the following code in an OnDtnDropdown() message handler for my own wrapper of the CTimeDateCtrl object that is an object in my own custom Toolbar:
CMonthCalCtrl* pCtrl = (CMonthCalCtrl*) GetMonthCalCtrl();<br />
ASSERT(pCtrl != NULL);<br />
pCtrl->ModifyStyle(0, MCS_DAYSTATE);<br />
SYSTEMTIME timeFrom;<br />
SYSTEMTIME timeUntil;<br />
int nCount = pCtrl->GetMonthRange(&timeFrom, &timeUntil, GMR_DAYSTATE);<br />
LPMONTHDAYSTATE pDayState;<br />
pDayState = new MONTHDAYSTATE[nCount];<br />
memset(pDayState, 0, sizeof(MONTHDAYSTATE) * nCount);<br />
int nIndex = (timeFrom.wDay == 1) ? 0 : 1;<br />
pDayState[nIndex] |= BIT4;<br />
pDayState[nIndex] |= BIT19;<br />
pDayState[nIndex] |= BIT25; <br />
pCtrl->SetDayState(nCount, pDayState);<br />
delete [] pDayState;


However when I call pCtrl->SetDayState(), it is there that the problem occurs and it directs me to the line that asserts that i previously mentioned.

The ModifyStyle function used in the third line seems to have no effect, as I checked the return value from pCtrl->GetStyle() before and after the call to ModifyStyle and the result was the same.

By the code to create the CMonthCalCtrl I meant the code that is prewritten in the source code provided with Visual C++, not the code the user writes.

Thanks
GeneralRe: CDateTimeCtrl Pin
palbano16-Jun-04 11:31
palbano16-Jun-04 11:31 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 11:34
sschilachi16-Jun-04 11:34 
GeneralRe: CDateTimeCtrl Pin
sschilachi17-Jun-04 0:38
sschilachi17-Jun-04 0:38 
GeneralRe: CDateTimeCtrl Pin
DRHuff25-Aug-04 11:25
DRHuff25-Aug-04 11:25 

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.