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

CXTPCalendarDayView::SetScaleMaxTime

 Post Reply Post Reply
Author
Message
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Topic: CXTPCalendarDayView::SetScaleMaxTime
    Posted: 02 March 2009 at 10:48am
I use Xtreme ToolkitPro v13.0.0

void CXTPCalendarDayView::SetScaleMaxTime(const COleDateTime dtNewScaleMaxTime)
{
    if (dtNewScaleMaxTime.GetStatus() == COleDateTime::valid)
    {
        m_dtTimeScaleMax = CXTPCalendarUtils::ResetDate(dtNewScaleMaxTime);

        CXTPCalendarControl::CUpdateContext updateContext(m_pControl, xtpCalendarUpdateRedraw);
    }
}


How can i set default value m_dtTimeScaleMax == 1.0 ???
I want see all time (all hours) at time scale. If i chenge it, i can't back...
m_dtTimeScaleMax is private member
I need help
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2009 at 12:00pm
I recompile libraries
void CXTPCalendarDayView::SetScaleMaxTime(const COleDateTime dtNewScaleMaxTime)
{
    if (dtNewScaleMaxTime.GetStatus() == COleDateTime::valid)
    {
        m_dtTimeScaleMax = dtNewScaleMaxTime;
        if ( m_dtTimeScaleMax.m_dt > 1.0 ) m_dtTimeScaleMax = CXTPCalendarUtils::ResetDate( m_dtTimeScaleMax );
        CXTPCalendarControl::CUpdateContext updateContext(m_pControl, xtpCalendarUpdateRedraw);
    }
}
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: 03 March 2009 at 8:04pm

You can set Max Scale Time in Options to be 23:30, Min Scale Time to be 0:00 = it will give you same result without code changes. Am I right?

At least I see in my DayView such hours range (0=00 - 23:30)
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2009 at 12:57am
No. By default you can see in DayView: 0:00 - 24:00.
Look in the constructor CXTPCalendarDayView - m_dtTimeScaleMax = 1.0
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2009 at 1:05am
If you do not change the function SetScaleMaxTime, then open access to m_dtTimeScaleMax, i want set it in (DATE)1.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: 04 March 2009 at 10:02pm
You right in term of logical bug in CXTPCalendarUtils::ResetDate function and I guess in some other functions of such strange class.
I already fixed enough here but need to fix more.
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: 18 March 2009 at 10:12pm
OK - I made m_dtTimeScaleMax (and m_dtTimeScaleMin also) to be PUBLIC - this is already in SVN.
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.156 seconds.