dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: CDockablePane and CanBeClosed()

  1. #16
    Join Date
    Jan 2009
    Posts
    246

    Re: CDockablePane and CanBeClosed()

    I modified the post where I shared the pictures.

  2. #17
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,231

    Re: CDockablePane and CanBeClosed()

    Quote Originally Posted by mesajflaviu View Post
    I modified the post where I shared the pictures.
    Still it is not clear (not readable) the exception reason nor its text.
    What is the value of pTabbedBar in this situation?
    What is the value of its m_hWnd member?
    Victor Nijegorodov

  3. #18
    Join Date
    Jan 2009
    Posts
    246

    Re: CDockablePane and CanBeClosed()

    Here is the pTabbedBar hWnd value:
    Code:
    	CDockablePane* pTabbedBar = NULL;
    	m_wndProperties.AttachToTabWnd(&m_wndFilter, DM_SHOW, TRUE, &pTabbedBar);	// pTabbedBar hWnd are 0x00071010
    	EnableAutoHidePanes(CBRS_ALIGN_ANY);
    
    	m_dockManager.LoadState(theApp.GetRegSectionPath(_T("ChildFrame")));
    	m_dockManager.SetDockState();
    
    	// pTabbedBar hWnd are now 0xfeefee
    	pTabbedBar->SetControlBarStyle(AFX_NON_CLOSE_DOCKING_PANE_STYLE);

  4. #19
    Join Date
    Jan 2009
    Posts
    246

    Re: CDockablePane and CanBeClosed()

    I have made it:
    Code:
    	CDockablePane* pTabbedBar = NULL;
    	m_wndProperties.AttachToTabWnd(&m_wndFilter, DM_SHOW, TRUE, &pTabbedBar);
    	EnableAutoHidePanes(CBRS_ALIGN_ANY);
    
    	m_dockManager.LoadState(theApp.GetRegSectionPath(_T("ChildFrame")));
    	m_dockManager.SetDockState();
    
    	pTabbedBar = (CDockablePane*)m_wndFilter.GetParentTabbedPane();
    	if(NULL != pTabbedBar->GetSafeHwnd())
    		pTabbedBar->SetControlBarStyle(AFX_NON_CLOSE_DOCKING_PANE_STYLE);
    works like a charm ! Thank you all of you for support !

  5. #20
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,231

    Re: CDockablePane and CanBeClosed()

    You are welcome!
    Victor Nijegorodov

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)