Undocumented calendar dependencies |
Post Reply |
Author | |||
BobC
Groupie Joined: 28 April 2017 Location: Longmont, CO Status: Offline Points: 55 |
Post Options
Thanks(0)
Posted: 07 May 2018 at 6:59pm |
||
This post is venting at Codejock documentation as much as it is a request for anyone with experience to tell me where I have gone wrong.
I'm using Xtreme Toolkit 18.3.0 with Visual Studio 15.7.0 on Windows 10, version 1709, build 16299.309.
I have a CXTPCalendarControl, a CXTPCalendarCaptionBarControl, and a CXTPCalendarCaptionBarTheme in a form view. They are declared in the form's header file as:
In the form's OnInitialUpdate(), these calls are made:
The contents of SetTheme() are the same as those in Codejock's calendar demo, minus the CCalendarDemoView's view-specific calls that do not apply to this form view, such as _ResizeControls() and the scrollbar handling. 1. It appears that there are no default settings in a caption bar for a theme if the user doesn't set one. If AttachCalendar() is called without first calling CXTPCaptionBar::SetTheme(), AttachCalendar() will fail because its m_pCaptionBar pointer is null. A default theme would be good. 2. There is some sort of declaration dependency because different types of application shutdown crashes can occur within one of those classes, depending on declaration order. For example, if declared in the order shown above, and the caption bar theme is set as in the code above, then on app shutdown, a heap corruption exception is thrown in the CXTPCalendarCaptionBarControl's destructor on its only line of code:
I have not yet determined what the true cause of the heap corruption is. Bob |
|||
BobC
Groupie Joined: 28 April 2017 Location: Longmont, CO Status: Offline Points: 55 |
Post Options
Thanks(0)
|
||
It looks like specifically creating and using the caption bar theme is a big part of the problem. This code works, where GetTheme() is used in the AttachCalendar() call instead of using the declared caption bar theme itself:
|
|||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |