How to close a docker by dock id?

Ivan.Zhang
2010-12-19
2013-05-28
  • Ivan.Zhang

    Ivan.Zhang - 2010-12-19

    Hi, David,
    Can I close a docker by its dock id?
    That is to say, I don't want to close it by press the close button on the title bar,
    I may close it by select a menu item or a button on main toolbar.
    Thank you.

     
  • David

    David - 2010-12-20

    Hi,

    The way to close a docker is to destroy it. You can use either Destroy or DestroyWindow for this purpose.

    In the DockMDITab sample, we could close a docker from CMainFrame as follows:
    m_DockTabbedMDI.GetDockFromID( ID)->Destroy();

    Best regards,
    David

     
  • Ivan.Zhang

    Ivan.Zhang - 2010-12-20

    Hi, David
    I use your method, the docker seems to be destroyed ,
    but the tab is still there, when I click the tab, the programe will throw exception.

     
  • David

    David - 2010-12-22

    I've submitted an update which adds CDocker::Close to close a docker.
    You can download the updated code using Tortoise SVN.

    Best regards,
    David

     
  • Ivan.Zhang

    Ivan.Zhang - 2010-12-22

    Hi, David,
    Thanks a lot~

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks