Print Page | Close Window

Setting Subject font properties

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=13652
Printed Date: 03 May 2024 at 10:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting Subject font properties
Posted By: wakerunner
Subject: Setting Subject font properties
Date Posted: 11 March 2009 at 1:34pm
Is it possible to set a calendar event subject's font to strikethrough when it is displayed in the calendar?
 
I wanted to use a custom property of "Status" to be able to mark an event done and want to be able to easily tell events that are done by having their subject displayed in strikethrough font.
 
Any help with code sample would be appreciated
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 64 bit
Language: Visual Basic 6.0





Replies:
Posted By: mdoubson
Date Posted: 11 March 2009 at 9:22pm
use BeforeDrawThemeObject
e.g.

void CCalendarDemoView::OnBeforeDrawThemeObject(XTP_NOTIFY_CODE Event, WPARAM wParam , LPARAM lParam){

............................................
if (wParam == xtpCalendarBeforeDraw_DayViewEvent){
...........................................
pTheme2007->GetDayViewPartX()->GetDayPartX()->GetGroupPartX()->GetSingleDayEventPartX()->m_fcsetNormal.fcsetSubject.fntFont.SetCustomValue(&s_fntStriked);
............................................
 
You can find in VB similar things


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


Posted By: wakerunner
Date Posted: 12 March 2009 at 2:05am
Thanks for the reply, I see how to set font underline in the "beforedrawthemeobject" event, however I have not been able to figure out how to get the event information in that procedure. I only want to use the strikethrough when a custom propery = a value.
 
How can you determine what event is being drawn in that procedure?


-------------
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 64 bit
Language: Visual Basic 6.0




Posted By: mdoubson
Date Posted: 12 March 2009 at 8:57am
You have enough information control passed as BeforeDrawThemeObject params. e.g,
................................
if (wParam == xtpCalendarBeforeDraw_DayViewEvent){

CXTPCalendarDayViewEvent* pViewEvent = (CXTPCalendarDayViewEvent*)lParam;

if (pViewEvent && pViewEvent->GetEvent()->GetSubject().Left(1) == _T("*")){.....}

else if (wParam == xtpCalendarBeforeDraw_MonthViewDay){

CXTPCalendarMonthViewDay* pDay = (CXTPCalendarMonthViewDay*)lParam;

if (pDay->GetDayDate().GetDayOfWeek() == 3){....}

................................


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


Posted By: wakerunner
Date Posted: 12 March 2009 at 9:38am
I appreciate the help. The first post I was able to convert to VB the 2nd I'm lost on.
 
Maybe somebody that programs in VB can help.
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 64 bit
Language: Visual Basic 6.0




Posted By: mdoubson
Date Posted: 12 March 2009 at 9:44am

you can cast lParam as Event in VB - similar to C++. Now you have access to Event info



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


Posted By: wakerunner
Date Posted: 12 March 2009 at 9:59am
I'm sure you can I just have not been able to figure out how to do it or how to translate your C code to VB.

-------------
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 64 bit
Language: Visual Basic 6.0





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