Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - How to switch from  Multischedule to Day mode?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to switch from Multischedule to Day mode?

 Post Reply Post Reply
Author
Message
KumarCJ View Drop Down
Groupie
Groupie
Avatar

Joined: 02 April 2007
Location: India
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote KumarCJ Quote  Post ReplyReply Direct Link To This Post Topic: How to switch from Multischedule to Day mode?
    Posted: 23 July 2008 at 2:18am
Hi,
 
I have one doubt, I implemented two modes 1) Multischedule and 2) Day
 
In multischedule mode I can see newly added scedules (Columns) but when I try to switch back to Day mode Columns remains as it is.
 
My question is
 
How to remove schedules while switching back to Day mode?
 
I tried following code but CAlendar cntrol is turning whole RED
 
Code:-
 
CXTPCalendarControl* pCalendarCtrl = &this->GetCalendarCtrl();
CXTPCalendarData * pData = pCalendarCtrl->GetDataProvider();
if (!pData)
    return;
  
pSchedules = pData->GetSchedules();
  
  
if (!pSchedules)
     return;  
            

int iCnt = pCalendarCtrl->GetResources()->GetCount();  
// Here I am getting proper column/schedule count (2)
for (int i = 0; i < iCnt; i++ )
{
     pCalendarCtrl->GetResources()->RemoveAt(0);
}
 
Thanks in advance.
Back to Top
AndreiM View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 18 August 2007
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndreiM Quote  Post ReplyReply Direct Link To This Post Posted: 06 August 2008 at 2:46pm
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.