iczelion tut32[1]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 jimgreen 的 blog

tutorial 32: multiple document interface (mdi)

this tutorial shows you how to create mdi application. it's actually not too difficult to do.

theory:

multiple document interface (mdi) is a specification for applications that handle multple documents at the same time. you are familiar with notepad: it's an example of single document interface (sdi). notepad can handle only one document at a time. if you want to open another document, you have to close the previous one first. as you can imagine, it's rather cumbersome. contrast it with microsoft word: word can open arbitrary documents at the same time and let the user choose which document to use. microsoft word is an example of multiple document interface (mdi).

mdi application has several characteristics that are distinctive. i'll list some of them:

  • within the main window, there can be multiple child windows in the client area. all child windows are clipped to the client area.
  • when you minimize a child window, it minimizes to the lower left corner of the client area of the main window.
  • when you maximize achild window, its title merges with that of the main window.
  • you can close a child window by pressing ctrl+f4 and switch the focus between the child windows by pressing ctrl+tab

the main window that contains the child windows is called a frame window. its client area is where the child windows live, hence the name "frame". its job is a little more elaborate than a usual window because it needs to handle some coordination for mdi.

to control an arbitrary number of child windows in your client area, you need a special window called client window. you can think of this client window as a transparent window that covers the whole client area of the frame window. it's this client window that is the actual parent of those mdi child windows. the client window is the real supervisor of the mdi child windows.

   
frame window
   
   
|
   
   
client window
   
   
|
   

|
|
|
|
|
mdi child 1
mdi child 2
mdi child 3
mdi child 4
mdi child n

本文关键:iczelion asm
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top