Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - DockingPane Question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DockingPane Question

 Post Reply Post Reply
Author
Message
zjroland View Drop Down
Groupie
Groupie


Joined: 09 December 2006
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote zjroland Quote  Post ReplyReply Direct Link To This Post Topic: DockingPane Question
    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?Oleguploads/20070117_104737_Grep.zip
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
zjroland View Drop Down
Groupie
Groupie


Joined: 09 December 2006
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote zjroland Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2007 at 8:04pm
yes, It's OK now, Thanks again.
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.141 seconds.