Compilation Tutorial: Multi-Document Interface (MDI)

Source: Internet
Author: User

This tutorial shows you how to create an MDI application. In fact, it's not very difficult.

Theory:

Multi-Document Interface (MDI) is a specification for applications that process multiple documents at the same time. You are very familiar with Notepad. It is an example of a single document interface (SDI). Notepad can only work with one document at a time. If you want to open another document, you must first close the one you opened earlier. You can imagine how much trouble this is. Compared to Microsoft Word: Word can open as many documents at the same time as you want, and lets users choose which document to use. Microsoft Word is an example of a multiple-document interface (MDI).

There are several notable features of MDI applications: I enumerate some of them:

With the main window, you can have multiple child windows in the client area. All child windows are located in the client area.

Minimizes a child window, which is minimized to the lower-left corner of the client area of the main window.

Maximizes a child window, with its caption combined with the title of the main window.

You can close the child window by pressing the CTRL+F4 key, and you can toggle between the child windows by pressing the Ctrl+tab key.

The main window that contains the child window is called the frame window. The client area of the main window is the place where the child window is active, and therefore has the name ' frame '. The main window's task is finer than the regular window because it requires some coordination for the MDI process.

To control any number of child windows in your client area, you need a special window: the client window. You can view the client window as a transparent window covering the entire client area of the frame window. The client window is the actual father of all MDI child windows. The client window is the true supervisor of the MDI child window.

frame window | Customer Window |     --------------------------------------------------------------------------------||     |     | |

MDI from Window 1

MDI from Window 2

MDI from Window 3

MDI from Window 4

MDI from Window N

Figure 1. Hierarchy of an MDI application
To create a frame window

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.