Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Crash In MultiScheule: XP Theme.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Crash In MultiScheule: XP Theme.

 Post Reply Post Reply
Author
Message
Makarand View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post Topic: Crash In MultiScheule: XP Theme.
    Posted: 15 January 2009 at 3:58am
Hi CJ support team,

Please review the following crash in CalendarDemo sample.
Please follow following steps :
1) Run the sample.
2) Set the XP Theme form the combo.
3) Select File->Load Sample MultiSchedule (Simple) From menu and load the default events.
4) Select Day Mode.
5) Resize the application window such that the horizontal scroll bar is visible in the bottom (see attached image).
6) Go to any date having one event in each schedule.
7) Now try to resize the event present in second column (eg. Jane).
8) Application will crash by showing an assert.




Also attaching crash location call stack




Thanks,
-Mak
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2009 at 11:16am
Bug confirmed. Working on it
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2009 at 12:10pm
As a direction to eliminate this problem (and related problem you don't report but can confirm [if you have horizontal scroll bar in multi-scheduled day view - try to use right arrow step from most left column to next - as a result you will come to ANOTHER day instead of another schedule of the same day] - I disable horizontal scroll bar in DayView mode - and all problems disapear:

BOOL CXTPCalendarDayView::GetScrollBarInfoH(SCROLLINFO* pSI, int* pnScrollStep)

{

return FALSE;

///////////////////////

Is it good for you - if user don't like too small columns - he can resize app window?
Back to Top
Makarand View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2009 at 11:14pm
Hi ,
 
Actually we don't want to disable horizontal scrall bar, as we have multiple
schedules columns. Our customers need to use smalls views in which they will need horizontal scroll bar.
 
So disabling the scroll bar is NOT and option for us.
 
Please let us know any other solution / fix to this problem
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 January 2009 at 10:22am
I fixed it - this is updated function code:

BOOL CXTPCalendarDayView::GetScrollBarInfoH(SCROLLINFO* pSI, int* pnScrollStep)

{

UNREFERENCED_PARAMETER(pnScrollStep);

ASSERT(pSI);

if (!pSI)

return FALSE;

int nMinColumnWidth = RecalcMinColumnWidth();

if (nMinColumnWidth <= 0)

return FALSE;

int nColumnsCount = GetTotalGroupsCount();

CRect rcClient = _GetScrollRectClient();

int nFullWidth = nColumnsCount * nMinColumnWidth;

if (nFullWidth <= rcClient.Width())

return FALSE;

pSI->nPos = min(m_nScrollOffsetX, nFullWidth);

pSI->nMin = 0;

pSI->nMax = nFullWidth-1;

pSI->nPage = rcClient.Width();

return TRUE;

}

Back to Top
Makarand View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2009 at 1:58am
Hi Mark,
Crash has been resolved by above code but following are the open issue-

1) Resizing the event change the date Eg. 19th Jan. to 20th Jan. this is wrong bihaviour.
2) Inline editing display problem due to change date.

Scr shot for more details

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2009 at 7:09am
Hi, I am afraid that we still running very different source set - even I gave you a few patches. I can't reproduce your bug in Office2007 theme and in old themes like Office2003. Event resizing works only in vertical (up and down) directions and so day not changed. Wait for release or get some prerelease (beta 13?) if it is possible(?)
Back to Top
Makarand View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2009 at 7:27am
Can you send the wole set for this particular issue?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2009 at 7:37am
I don't think so - you should use official way. I can't attach source of component as forum's topic attachment(!?)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.