Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Demo - Week View ToolBar bug
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Demo - Week View ToolBar bug

 Post Reply Post Reply
Author
Message
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Topic: Demo - Week View ToolBar bug
    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);   
}
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: 08 September 2009 at 6:34pm
You right - but this is only Demo source bug - not Core code
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.125 seconds.