OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Adding Behavior To an MDI Client Window

Because you usually use an instance of TMDIFrame as your MDI frame window, you need to add application-wide behavior to your MDI client window class.

The frame window owns menus and tool bars but passes the commands they generate to the client window and to the application. A common message-response function would respond to the File|Open menu command to open another MDI child window.

Manipulating Child Windows

TMDIClient has several member functions for manipulating MDI child windows. Commands from an MDI application's child-window menu control the child windows. TMDIClient automatically responds to those commands and performs the appropriate action:

ActionMenu command IDTMDIClient member function
CascadeCM_CASCADECHILDRENTMDIClient::CmCascadeChildren()
TileCM_TILECHILDRENTMDIClient::CmTileChildren()
Tile HorizontallyCM_TILECHILDRENHORIZTMDIClient::CmTileChildrenHoriz()
Arrange IconsCM_ARRANGEICONSTMDIClient::CmArrangeIcons()
Close AllCM_CLOSECHILDRENTMDIClient::CmCloseChildren()
Note
The header file owl\mdi.h includes owl\mdi.rh for your applications. owl\mdi.rh is a resource header file that defines the menu command IDs listed above. When you design your menus in your resource script, be sure to include owl\mdi.rh to get those IDs.

MDI child windows should not respond to any child-window menu commands. The MDI client window takes care of them.

See Also