Multiple Document Interface
Multiple Document Interface The multiple-document interface (MDI) is a specification that defines a user interface for applications that enable the user to work with more than one document at the same time.

Note  MDI is an application-oriented model. Many new and intermediate users find it difficult to learn to use MDI applications. Therefore, many applications are switching to a document-oriented model. Therefore, you may want to consider other models for your user interface. However, you can use MDI for applications which do not easily fit into an existing model until a more suitable model is introduced.

Overviews

About the Multiple Document Interface

Using the Multiple Document Interface

This section explains how to perform tasks associated with the Multiple Document Interface.

Functions

CreateMDIWindow

The CreateMDIWindow function creates a MDI child window.

DefFrameProc

The DefFrameProc function provides default processing for any window messages that the window procedure of a MDI frame window does not process. All window messages that are not explicitly processed by the window procedure must be passed to the DefFrameProc function, not the DefWindowProc function.

DefMDIChildProc

The DefMDIChildProc function provides default processing for any window message that the window procedure of a MDI child window does not process. A window message not processed by the window procedure must be passed to the DefMDIChildProc function, not to the DefWindowProc function.

TranslateMDISysAccel

The TranslateMDISysAccel function processes accelerator keystrokes for window menu commands of the MDI child windows associated with the specified MDI client window. The function translates WM_KEYUP and WM_KEYDOWN messages to WM_SYSCOMMAND messages and sends them to the appropriate MDI child windows.

Messages

WM_MDIACTIVATE

An application sends the WM_MDIACTIVATE message to a MDI client window to instruct the client window to activate a different MDI child window.

WM_MDICASCADE

An application sends the WM_MDICASCADE message to a MDI client window to arrange all its child windows in a cascade format.

WM_MDICREATE

An application sends the WM_MDICREATE message to a MDI client window to create an MDI child window.

WM_MDIDESTROY

An application sends the WM_MDIDESTROY message to a MDI client window to close an MDI child window.

WM_MDIGETACTIVE

An application sends the WM_MDIGETACTIVE message to a MDI client window to retrieve the handle to the active MDI child window.

WM_MDIICONARRANGE

An application sends the WM_MDIICONARRANGE message to a MDI client window to arrange all minimized MDI child windows. It does not affect child windows that are not minimized.

WM_MDIMAXIMIZE

An application sends the WM_MDIMAXIMIZE message to a MDI client window to maximize an MDI child window. The system resizes the child window to make its client area fill the client window. The system places the child window's window menu icon in the rightmost position of the frame window's menu bar, and places the child window's restore icon in the leftmost position. The system also appends the title bar text of the child window to that of the frame window.

WM_MDINEXT

An application sends the WM_MDINEXT message to a MDI client window to activate the next or previous child window.

WM_MDIREFRESHMENU

An application sends the WM_MDIREFRESHMENU message to a MDI client window to refresh the window menu of the MDI frame window.

WM_MDIRESTORE

An application sends the WM_MDIRESTORE message to a MDI client window to restore an MDI child window from maximized or minimized size.

WM_MDISETMENU

An application sends the WM_MDISETMENU message to a MDI client window to replace the entire menu of an MDI frame window, to replace the window menu of the frame window, or both.

WM_MDITILE

An application sends the WM_MDITILE message to a MDI client window to arrange all of its MDI child windows in a tile format.

Structures

MDICREATESTRUCT

The MDICREATESTRUCT structure contains information about the class, title, owner, location, and size of a MDI child window.

Tags :


Page view tracker