locked
How to hide a background tabbed document and keep its embedded pane floating (visible) in the foreground...

    Pregunta

  • Hello.  I'm working on floating MDI tabbed documents.  I have a float handler as shown below.  m_wndFileView is of type CDockablePane.

     void CMainFrame::OnWindowFloat()
    {
    
    	m_wndFileView.SetAutoHideMode(FALSE, CBRS_ALIGN_ANY);
    
    	CRect rectClient;
    	m_wndClientArea.GetWindowRect(&rectClient);
    
    	m_wndFileView.FloatPane(rectClient);
    
    	return;
    
    }
    

    I converted the dockable pane to a tabbed document in MainFrame::OnCreate...

    	m_wndFileView.ConvertToTabbedDocument();

    When I right click on the tab, I select float and the control bar, along with the client area, manifests for the dockable pane. I can then dock the floating pane anywhere I want.

    Here's what I get...

    I would like to hide the background tabbed document and keep the floating pane visible.  [Also, later I would like to be able to drag the tab into the client area and manifest the dockable pane.  I'm attempting to eventually duplicate the functionality of the VS2010 SP1 IDE.]

    Thanks.


    PAC


    • Editado PACMAN_1 domingo, 11 de marzo de 2012 15:56
    sábado, 10 de marzo de 2012 0:17

Respuestas

  • There is something wrong going on here. Once you float a docked pane, the tab should automatically hide. I suspect that there is some disconnect between your actual tabbed view and teh float pane.
    Try this as an experiment: Have some dummy  rectangle draw in your 'FileView:;Draw()' code. Try 'floating' now.  Does the rectangle show up in your floating window?

    ..Also see what happens in a sample MFC tabbed application. You won't find code anywhere in the files generated that closes the tabbed MDI child on floating. That will be done under the hoods by MFC.

    -Seetharam

    • Marcado como respuesta Rob Pan lunes, 19 de marzo de 2012 8:51
    lunes, 12 de marzo de 2012 15:23

Todas las respuestas

  • Hello again, the background tabbed document can be closed manually by selecting the 'x' while keeping the floating pane visible in the foreground.  I'm attempting to do this programmatically from my mainframe class, but eventually I may move some of this processing to my doc class.  Thanks.

    PAC


    • Editado PACMAN_1 domingo, 11 de marzo de 2012 15:57
    domingo, 11 de marzo de 2012 15:55
  • There is something wrong going on here. Once you float a docked pane, the tab should automatically hide. I suspect that there is some disconnect between your actual tabbed view and teh float pane.
    Try this as an experiment: Have some dummy  rectangle draw in your 'FileView:;Draw()' code. Try 'floating' now.  Does the rectangle show up in your floating window?

    ..Also see what happens in a sample MFC tabbed application. You won't find code anywhere in the files generated that closes the tabbed MDI child on floating. That will be done under the hoods by MFC.

    -Seetharam

    • Marcado como respuesta Rob Pan lunes, 19 de marzo de 2012 8:51
    lunes, 12 de marzo de 2012 15:23