Print Page | Close Window

Demo - Week View ToolBar bug

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=15136
Printed Date: 28 April 2024 at 6:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Demo - Week View ToolBar bug
Posted By: Algae
Subject: Demo - Week View ToolBar bug
Date Posted: 08 September 2009 at 5:34pm
v. 13.1

Not a big deal, but might help folks starting out with the toolkit.

Existing code does not highlight the "7" toolbar button properly when using the "FullWeekView" (i.e. MultiColumn week mode).

void CCalendarDemoView::OnUpdateCalendarViewWeek(CCmdUI* pCmdUI)
{
    BOOL bViewWeek = FALSE;
    CXTPCalendarView* pView = GetCalendarCtrl().GetActiveView();
    if (pView && pView->GetViewType() == xtpCalendarWeekView)
        bViewWeek = TRUE;   
    pCmdUI->SetCheck(bViewWeek);   
}

Fix:

void CCalendarDemoView::OnUpdateCalendarViewWeek(CCmdUI* pCmdUI)
{
    BOOL bViewWeek = FALSE;

    CXTPCalendarView* pView = GetCalendarCtrl().GetActiveView();
    if (pView && pView->GetViewType() == xtpCalendarWeekView ||
        pView->GetViewType() == xtpCalendarFullWeekView )

        bViewWeek = TRUE;

    pCmdUI->SetCheck(bViewWeek);   
}



Replies:
Posted By: mdoubson
Date Posted: 08 September 2009 at 6:34pm
You right - but this is only Demo source bug - not Core code

-------------
Mark Doubson, Ph.D.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net