Print Page | Close Window

Setting

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=13923
Printed Date: 21 November 2024 at 10:44pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting
Posted By: zaksoft
Subject: Setting
Date 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




Replies:
Posted By: mdoubson
Date Posted: 08 April 2009 at 4:24pm
Check how it done in Event Editor

-------------
Mark Doubson, Ph.D.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net