Setting Subject font properties |
Post Reply |
Author | |
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
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
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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){....}................................
|
|
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
you can cast lParam as Event in VB - similar to C++. Now you have access to Event info |
|
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
|
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 |
|
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 |