Question about TabbedView sample |
Post Reply |
Author | |
zjroland
Groupie Joined: 09 December 2006 Status: Offline Points: 42 |
Post Options
Thanks(0)
Posted: 15 January 2007 at 9:20am |
I need to run a function of CPropertiesView at CTabbedViewView, but error occurs.
There is a function in CPropertiesView, I need to use it at CTabbedViewView.
here is my code:
void CTabbedViewView::OnEditTest()
{ CView* pView = DYNAMIC_DOWNCAST(CView, CWnd::FromHandle(m_wndTabControl.GetSelectedItem()->GetHandle())); //here error occurs ((CPropertiesView*)pView)->Doatest(); } but error occurs, I debug to XTPTabManager.h
AFX_INLINE CXTPTabManagerItem* CXTPTabManager::GetSelectedItem() {
return m_pSelected; //here error occurs } How can I run this function at CTabbedViewView?
here is my code. uploads/20070115_091807_TabbedView.zip
Oleg, pleae test here: main menu - Edit - Test
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Problem in
void CMainFrame::OnEditTest()
{ CTabbedViewView *m_pView = (CTabbedViewView *)this->GetActiveView(); m_pView->OnEditTest(); } GetActiveView is not CTabbedViewView .
better add
ON_COMMAND(ID_EDIT_TEST, OnEditTest)
in CPropertiesView. and remove CMainFrame::OnEditTest() and TabbedViewView::OnEditTest()
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |