Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - How to advance Calendar week and month view?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to advance Calendar week and month view?

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


Joined: 01 December 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote EricFowler Quote  Post ReplyReply Direct Link To This Post Topic: How to advance Calendar week and month view?
    Posted: 23 December 2009 at 12:33am
Should be simple:
I have a calendar in week (or month) view, displaying a slab of days starting Dec. 21.

I want to advance to the next week (or month).

This looks to be easy in day view but is not working in week view:

{
          CXTPCalendarWeekView * pWeek = (CXTPCalendarWeekView *)m_ctrlCalendar.GetActiveView();
          COleDateTimeSpan span(7,0,0,0);
          COleDateTime beginDate = pWeek->GetBeginDate();
          pWeek->SetBeginDate(beginDate - span);
}

This does not work.

Day view has an easy function, can't find for week view.

Eric
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: 23 December 2009 at 10:58am
You can use CaptionBar Handlers (Next - Prev) which do desired advance - call it in your code if needed
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.