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

Change Event Colors

 Post Reply Post Reply
Author
Message
Joe_Cali View Drop Down
Newbie
Newbie


Joined: 03 December 2009
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Joe_Cali Quote  Post ReplyReply Direct Link To This Post Topic: Change Event Colors
    Posted: 04 December 2009 at 4:47pm

I need to change a specific event to a different background color.  Am using Office2007 theme, and trying to capture the XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT event by calling OnBeforeDrawThemeObject, but this function is never hit.

 
What am I missing.
 
Thanks
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: 10 December 2009 at 1:30pm
Need to turn it ON:

m_Sink.Advise(ptrCalendarConn, XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT, &CCalendarDemoView::OnBeforeDrawThemeObject);

Back to Top
Joe_Cali View Drop Down
Newbie
Newbie


Joined: 03 December 2009
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Joe_Cali Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2009 at 2:14pm
I did have the following already in my code:
      m_Sink.Advise(ptrCalendarConn, XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT, &MCSchedulerDlg::OnBeforeDrawThemeObject);
 
And also the function
      void MCSchedulerDlg::OnBeforeDrawThemeObject(XTP_NOTIFY_CODE Event, WPARAM wParam, LPARAM lParam)
      {...
 
But the function is never hit
 
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: 17 December 2009 at 2:36pm
I works in CalendarDemo - where App View derived from CXTPCalendarControlView
For dialog need some modifications I guess
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.203 seconds.