Problems getting calendar to exit properl |
Post Reply |
Author | |
RolandoE.
Groupie Joined: 19 May 2003 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
Posted: 03 October 2005 at 8:37am |
Hi, I've tried everything I can think about. I even copied code from another proyect which uses the Calendar Control successfully and I am still having some problems with the following code. The program comes up and everything runs fine. There is no code to post events or anything like this. All I am doing right now is displaying the Calendar control and linking it with the Date Picker control via the CXTPCalendartController class. Within CDlgAgenda::OnInitDialog()...
The problem I am having is when the application exits I am getting an error within CCmdTarget::~CCmdTarget()!! Tracing back I get to CWnd::~CWnd(), CXTPCalendarControl::~CCalendarControl() then finally CDlgAgenda::~CDlgAgenda() (This is where the calendar control is found). The weird part is that I do not have this problem if I comment out the following line:
Any ideas? Do you need more information? I already tried creating the calendar control within OnCreate(). Thanks for the help. Rolando |
|
Rolando E. Cruz-Marshall
|
|
RolandoE.
Groupie Joined: 19 May 2003 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
|
More on previous message!!! I do not know if this matters at this point but I only get the above mentioned behaviour in DEBUG mode only! |
|
Rolando E. Cruz-Marshall
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Rolando,
It looks like an assertion could be caused because a destructor for the Calendar is called before the destructor for Controller. Try to Set calendar and date picker to NULL in your dialog destructor:
-- WBR, Serge |
|
RolandoE.
Groupie Joined: 19 May 2003 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Thanks It worked!!
|
|
Rolando E. Cruz-Marshall
|
|
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 |