Print Page | Close Window

DockingPane Question

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=6145
Printed Date: 12 December 2024 at 9:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DockingPane Question
Posted By: zjroland
Subject: DockingPane Question
Date Posted: 17 January 2007 at 10:48am
I have two DockingPanes, and I need to change the Controls of these DockingPanes at Main Menu:
 
Maybe there are two AFX_IDW_PANE_FIRST:
CSearchOptionsView* CMainFrame::GetSearchOptionsView()
{
 CXTPDockingPane* pPane = m_paneManager.FindPane(IDR_PANE_OPTIONS);
 if (!pPane)
  return 0;
 CWnd* pWnd = pPane->GetChild();
 if (!pWnd)
  return 0;
 return (CSearchOptionsView*)pWnd->GetDescendantWindow(AFX_IDW_PANE_FIRST);
}
CPaneChat* CMainFrame::GetChatView()
{
 CXTPDockingPane* pPane = m_paneManager.FindPane(IDR_PANE_CHAT);
 if (!pPane)
  return 0;
 CWnd* pWnd = pPane->GetChild();
 if (!pWnd)
  return 0;
 return (CPaneChat*)pWnd->GetDescendantWindow(AFX_IDW_PANE_FIRST);
}
 
Here is the code from your sample "Grep"
When I click Main menu - Edit - static and Edit - test ,it crashed.
please tell me why?Oleg https://forum.codejock.com/uploads/20070117_104737_Grep.zip - uploads/20070117_104737_Grep.zip
 



Replies:
Posted By: Oleg
Date Posted: 17 January 2007 at 4:11pm
in
 void CMainFrame::OnEditTest()
{
 CPaneChat* pChatView = GetChatView();
 pChatView->OnChangeStatic();
 
}
 
 
check that pChatView not NULL before call its method.
 
View will be NULL before become visible first time.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: zjroland
Date Posted: 17 January 2007 at 8:04pm
yes, It's OK now, Thanks again.



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