winapimfcmdimdichildmdiparent

Take MDI Child Window out of the MDI frame Window in an MFC application


I have an MDI legacy MFC application. Inside the MDI Frame Window, I have MDI Child Windows. Is there a way I can take these MDI Child Windows out of the MDI Frame Window? I am asking that to see if I want to see different child windows in different monitors. Right now, all the Child Windows are constrained inside the MDI Frame Window.


Solution

  • An MDI child window cannot be removed from the MDI frame window. You will have to move the MDI child's content onto a separate free-floating window, and then you can position that window as desired. For instance, put the MDI child's content inside of some container window that is a child of/docked to the MDI child window, and then you can simply reparent/redock that container onto the floating window when needed.