Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: CDateTimeCtrl Pin
sschilachi25-Aug-04 11:51
sschilachi25-Aug-04 11:51 
GeneralRe: CDateTimeCtrl Pin
DRHuff25-Aug-04 16:45
DRHuff25-Aug-04 16:45 
GeneralRe: CDateTimeCtrl Pin
DRHuff25-Aug-04 18:47
DRHuff25-Aug-04 18:47 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 10:58
sschilachi16-Jun-04 10:58 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 10:59
sschilachi16-Jun-04 10:59 
GeneralRe: CDateTimeCtrl Pin
Ravi Bhavnani16-Jun-04 9:55
professionalRavi Bhavnani16-Jun-04 9:55 
GeneralRe: CDateTimeCtrl Pin
palbano16-Jun-04 10:02
palbano16-Jun-04 10:02 
GeneralRe: CDateTimeCtrl Pin
Ravi Bhavnani16-Jun-04 10:05
professionalRavi Bhavnani16-Jun-04 10:05 
GeneralRe: CDateTimeCtrl Pin
palbano16-Jun-04 10:22
palbano16-Jun-04 10:22 
GeneralRe: CDateTimeCtrl Pin
Ravi Bhavnani16-Jun-04 10:33
professionalRavi Bhavnani16-Jun-04 10:33 
GeneralBitmap Background for CDialog Pin
DanYELL16-Jun-04 9:02
DanYELL16-Jun-04 9:02 
GeneralRe: Bitmap Background for CDialog Pin
palbano16-Jun-04 10:47
palbano16-Jun-04 10:47 
Generalbegginner needing help Pin
bmatty16-Jun-04 9:01
bmatty16-Jun-04 9:01 

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.