Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Setting Subject font properties
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting Subject font properties

 Post Reply Post Reply
Author
Message
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post Topic: Setting Subject font properties
    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


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: 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
Back to Top
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post 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


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: 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){....}

................................
Back to Top
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post 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


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: 12 March 2009 at 9:44am

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

Back to Top
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post 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


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.141 seconds.