Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Show Start and End Time
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Show Start and End Time

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


Joined: 30 October 2007
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote DataFlowJoe Quote  Post ReplyReply Direct Link To This Post Topic: Show Start and End Time
    Posted: 05 May 2009 at 6:47am
This should be so obvious, I'm embarassed having to ask for it.... but I simply cannot find it on the forum or in the help file.
 
The start time and end time is displayed when the mouse is moved over the event box.
 
How do I permanently show the start and end time in the event box displayed on the calendar, not just when the mouse pointer is moved over it.
 
I thought the following flags did it but they dont....
 
 CalendarControl.Options.AdditionalOptionsFlags.SetFlag xtpCalendarOptDayViewShowStartTimeAlways
 CalendarControl.Options.AdditionalOptionsFlags.SetFlag xtpCalendarOptDayViewShowEndTimeAlways
 
Any help greatly appreciated.
 
 
He is no fool who gives what he cannot keep to gain what he cannot lose. (Jim Elliott)
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: 07 May 2009 at 5:01pm
 
There are different options for different mode - check your VB sample for details please
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2010 at 7:07am
How can this be done in WorkWeekView in Office2007 theme?
In the moment only the subject is displayed, but not start/endtime (in other themes times are displayed)

I havn't found any API function in XTPCalandarControl.
And it doesn't help to set

xtpCalendarOptWorkWeekViewShowStartTimeAlways
xtpCalendarOptWorkWeekViewShowEndTimeAlways

option flags.

Any ideas?


Using 13.3.1 and VC++
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2010 at 10:12am
Okay a further look in the code shows (as far as I can see), that this feature is not implemented in Office2007 theme, btw. MS doesn't have this either.

So, an easy way is to sink the following function:

void CCalendarView::OnEvent_GetItemText(XTP_NOTIFY_CODE Event, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    XTP_CALENDAR_GETITEMTEXT_PARAMS* pParams = (XTP_CALENDAR_GETITEMTEXT_PARAMS*)wParam ;
   
    if (XTP_NC_CALENDAR_GETITEMTEXT != Event || !pParams)
        return;

    if (xtpCalendarItemText_EventSubject == pParams->nItem)
    {
        // modifiy text here, set date in subject
        ....
    }
}

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.