More than one instance of calendar Ctrl? |
Post Reply |
Author | |
RolandoE.
Groupie Joined: 19 May 2003 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
Posted: 24 August 2005 at 1:53pm |
Hi, I'm running into a small problem. I have one screen (Schedule Planner) which uses the Calendar control and I have no problems with it. Since I can get to appointments events via another screen I have the need to create and access the Calendar control. The problem I am having is when I save the information. When I return the Schedule Planner screen the program crashes. I need to manually remove the modified event so the program can work once again. I am creating and calling all of the calendar controls just like in the Schedule Planner screen except I am not calling the Populate method. Could this be the problem? Thanks. |
|
Rolando E. Cruz-Marshall
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Rolando,
It's not absolutely clear what is your problem, I'd probably need to look at your sample. But most likely, to work properly, your application would also need to increase objects reference count before working with them in different places. -- WBR, Serge |
|
RolandoE.
Groupie Joined: 19 May 2003 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Hi, What I am trying to explain is that I have two different sections of the program (Schedule Planner [Calendar Control is displayed here] and Contact Appointments [Hidden Calendar Control]) which can access the same dialog box I created to add or edit appointments. If I call the Add Appointment dialog from the Schedule Planner screen I can add, edit or delete appointments just fine. If I call the Add appointment dialog from the Contact Appointments screen I can also display information from the (hidden) Calendar and save the changes made to the appointment (Event record). When I return to the Schedule Planner screen the program will crash and continue to crash until I manually delete the offending event from the Event Table. Hope this explanation helps. |
|
Rolando E. Cruz-Marshall
|
|
RolandoE.
Groupie Joined: 19 May 2003 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Please disregard! I was able to figure out what to do. Within the Add/Edit Appointment dialog box I create a new instance of the Calendar Control as a child of the window but I do not display it. I then set up a CXTPCalendarData, got the Data Provider (GetDataProvider) from m_wndCalendar and then an Open() method. Now when the data is saved it is updating the calendar as well and the program is no longer crashing. It just seems to be a mix-up on my part trying to figure out how to use the Calendar control. Thanks for the previous help. |
|
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 |