Search code examples
c++cwinapiwindowchildwindow

Constraining draggable child windows within parent window?


Please take a look at this screenshot:

enter image description here

As you can see, the "Executable modules" and "Threads" child windows are free to roam about in the sandbox-like "Themida" parent window, and if they get dragged past the edge the overflow simply gets hidden. How can I create this effect?


Solution

  • That is a Multiple Document Interface (MDI) application. The containing window, with the dark grey background is the MDI client window, and the windows inside are the MDI child windows.

    The use of MDI has been discouraged by Microsoft for many years so you may wish to think twice about using it in a new application.