21.2.1 Registering the Window Classes

In general, a typical MDI application must register two window classes: one for its frame window and one for its child window. The class structure for the frame window is similar to the class structure for the main window in non-MDI applications. The class structure for the MDI child windows differs slightly from the structure for child windows in non-MDI applications; following are the differences:

The class structure should have an icon, because the user can minimize an MDI child window as if it were a normal application window.

The menu name should be NULL, because MDI child windows cannot have their own menus.

The class structure should reserve extra space in the window structure. With this space, the application can associate data, such as a filename, with a particular child window.

An application may have more than one window class for its MDI child windows, if there is more than one type of document available in the application.

Note that the application does not register a class for the MDI client window, which Windows defines.

In the Multipad application, the locally defined function InitializeApplication registers the MDI window classes.