Your browser doesn't support JavaScript Multiple Document Interface - Windows Programming

Multiple Document Interface

The multiple-document interface (MDI) enables a user to work with more than one document with multiple windows contained within a single parent window. An MDI application must register two window classes: one for its frame window and one for its child windows. At any one time, only one document window is active (indicated by a highlighted title bar), and it appears in front of all the other document windows.

Creating an MDI Application

The first step in creating an MDI application is registering the window classes. One class will be required for the MDI frame window, and another class will be required for each type of MDI child window. The class structure for an MDI frame window is like a normal application main window. The class structure for an MDI child window is filled in like the class structure for child windows with two exceptions. First, the class structure for an MDI child window should specify an ICON since the user can minimize MDI child windows within the MDI frame window. Second, the menu name should be NULL, since an MDI child window can not have its own menu.

Example

The following short program demonstrates how to create a Multiple document interface. Clicking the Menubar item file followed by the menu item new creates a new MDI child window containing a textbox.