Compaq Visual Fortran: A Guide to Creating Windows Applications

Chapter 12: Multiple Document Interface (MDI) Applications

12.1 Introduction

Multiple document interface (MDI) applications allow a user to create and work with multiple documents within a single application. The MDI applications described here must be of the Fortran Windows project type, since they need to use the full set of Win32 APIs, including graphics (GDI) functions. The multiple documents can be of a single type, such as text documents in word processing, or of several types for example a spreadsheet and a chart. The main window of an MDI application is called the "frame window" (see Figure 12.1). It is a conventional window with a title bar, a menu, a sizing border, and a system menu icon plus minimize, maximize, and close buttons.


Figure 12.1: Multiple document interface window.

In Figure 12.1, the client area of the frame window is filled with a client window (workspace) whose color is the system color COLOR_APP-WORKSPACE. This client window provides most of the MDI support, and it is where child windows are displayed. The client window of an MDI application is created in WM_CREATE by calling the function CreateWindow, but on this occasion, the window class is the predefined type MDICLIENT.

Child windows are created by sending the client window a WM_MDICREATE message with a pointer to a structure of type MDICREATESTRUCT. These child windows are used for displaying documents, and, as can be seen in Figure 12.1, they essentially look like any single-document window. Child windows can never appear outside the application window, because they are clipped to the workspace...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Windows
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.