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

Saving State

 Post Reply Post Reply
Author
Message
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Topic: Saving State
    Posted: 21 October 2005 at 11:30am
Me again,

I don't see how I save the state of the calendar - i.e. the current configuration such as view, days of working week etc.

Obviously I can do this myself by saving all the options, just wondering if you have anything built-in.

Have a nice quiet weekend,

Simon HB9DRV
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2005 at 12:27pm
Found it myself
Simon HB9DRV
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2005 at 12:40pm
Ok, just to help others:

There are 2 levels for the calendar settings.
    1 - CalendarOptions (see corresponding object and property in the data provider)
    2 - Other settings (like active view type and first visible day, enable scrolling, ...)

CalendarOptions loaded and aplied when Open method of a data provider is called and stored when Save method is called. This works for xml/binary and DB data providers.

If you'd like to save options yourself in other place - keep in mind that you have to apply them to calendar after Open method of data provider is called.

Other settings (like active view type and first visible day) are not stored automatically and you have to save/restore them yourself.

After changing options please call Populate() and RedrawControl() methods to update control.

--
HTH,
Serge
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.172 seconds.