Print Page | Close Window

calendar in splitter view

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Visual C++ MFC
Forum Description: Topics related to Codejock Visual C++ MFC products
URL: http://forum.codejock.com/forum_posts.asp?TID=12147
Printed Date: 29 April 2024 at 9:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: calendar in splitter view
Posted By: lowekt
Subject: calendar in splitter view
Date Posted: 13 September 2008 at 10:15pm
Hi,
 
I'm trying to implement a splitter application with a calendar in the right pane.  I am using the calendardemo example as a basis and I am getting an error during OnInitialUpdate for the right view in the following code:
 

CXTPCalendarControl* COptionsDialogBar::GetCalendarCtrl()

{

CView* pView = ((CFrameWnd*)AfxGetMainWnd())->GetActiveFrame()->GetActiveView();

ASSERT_KINDOF(CsscdrView, pView);

if (pView)

return &((CsscdrView*)pView)->GetCalendarCtrl();

else

return NULL;

}

The error seems to occur because the active view is still the LeftView rather than the right view.  I'm sure there must be something I'm missing prior to this to change the active view but I'm too new to splitters to figure this out so far.  Any help would be great!
 
Thanks,
 
-Ken



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