Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Setting
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting

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

Joined: 05 June 2003
Location: Italy
Status: Offline
Points: 162
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaksoft Quote  Post ReplyReply Direct Link To This Post Topic: Setting
    Posted: 04 April 2009 at 2:00pm
I insert new events into calendar reading from a DB, into a loop I use
 
 
CXTPCalendarEventPtr ptrEvent = pDataProvider->CreateNewEvent();

ptrEvent->SetStartTime( dtIni);
ptrEvent->SetEndTime( dtEnd);
ptrEvent->SetSubject( sTitle);
ptrEvent->SetLocation( sLocation);

// Need to set color
 
if ( sDaily == _T( "S"))
 ptrEvent->SetAllDayEvent( TRUE);

pDataProvider->AddEvent(ptrEvent); 

How can I assing CXTPCalendarEventCategoryID ( I need to change color) ?
 
After getting

CXTPCalendarEventCategoryIDs * pCat = ptrEvent->GetCategories();

I dont know how to set (for example) xtpCalendarEventCategoryGreen to the event
 
TIA
VS2022 - MFC MBCS Statically linked

XTP 23.1 Static Link

---------------------------------------------------------

Davide Zaccanti - ZakSoft - www.zaksoft.com

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: 08 April 2009 at 4:24pm
Check how it done in Event Editor
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.234 seconds.