![]()  | 
 
DockingPane Question | 
 
    Post Reply  
   | 
  
| Author | |
   
   zjroland  
   
   Groupie  
   Joined: 09 December 2006 Status: Offline Points: 42  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: DockingPane QuestionPosted: 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 
 | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   zjroland  
   
   Groupie  
   Joined: 09 December 2006 Status: Offline Points: 42  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 17 January 2007 at 8:04pm | 
 
| 
   
    
   yes, It's OK now, Thanks again.
    
   
   | 
 |
![]()  | 
 |
    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  |