亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lion-tutorial32.htm

?? 內有一些代碼
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<html>
<head>
<title>Iczelion's Win32 Assembly Tutorial 32: Multiple Document Interface (MDI)</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
</head>

<body bgcolor="#FFFFFF">
<h1 align="center"><font face="Tahoma">Tutorial 32: Multiple Document Interface 
  (MDI)</font></h1>
<p align="left"><font face="MS Sans Serif" size="-1">This tutorial shows you how 
  to create MDI application. It's actually not too difficult to do. Download <a href="files/tut32.zip">the 
  example</a>.</font></p>
<h3 align="left"><font face="MS Sans Serif" size="-1">Theory:</font></h3>
<p align="left"><font face="MS Sans Serif" size="-1">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).</font></p>
<p align="left"><font face="MS Sans Serif" size="-1">MDI application has several 
  characteristics that are distinctive. I'll list some of them:</font></p>
<ul>
  <li><font face="MS Sans Serif" size="-1">Within the main window, there can be 
    multiple child windows in the client area. All child windows are clipped to 
    the client area.</font></li>
  <li><font face="MS Sans Serif" size="-1">When you minimize a child window, it 
    minimizes to the lower left corner of the client area of the main window.</font></li>
  <li><font face="MS Sans Serif" size="-1">When you maximize achild window, its 
    title merges with that of the main window.</font></li>
  <li><font face="MS Sans Serif" size="-1">You can close a child window by pressing 
    Ctrl+F4 and switch the focus between the child windows by pressing Ctrl+Tab</font></li>
</ul>
<p><font face="MS Sans Serif" size="-1">The main window that contains the child 
  windows is called<b> a frame window</b>. Its client area is where the child 
  windows live, hence the name &quot;frame&quot;. Its job is a little more elaborate 
  than a usual window because it needs to handle some coordination for MDI.</font></p>
<p><font face="MS Sans Serif" size="-1">To control an arbitrary number of child 
  windows in your client area, you need a special window called <b>client window</b>. 
  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.</font></p>
<table width="100%">
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td> 
      <table border="1" cellpadding="3" align="center">
        <tr> 
          <th nowrap> 
            <div align="center"><font face="MS Sans Serif" size="-1">Frame Window</font></div>
          </th>
        </tr>
      </table>
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td> 
      <div align="center">| </div>
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td> 
      <table border="1" cellpadding="3" align="center">
        <tr> 
          <th nowrap><font face="MS Sans Serif" size="-1">Client Window</font></th>
        </tr>
      </table>
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td> 
      <div align="center">|</div>
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="5"> 
      <hr noshade>
    </td>
  </tr>
  <tr> 
    <td> 
      <div align="center">|</div>
    </td>
    <td> 
      <div align="center">|</div>
    </td>
    <td> 
      <div align="center">|</div>
    </td>
    <td> 
      <div align="center">|</div>
    </td>
    <td> 
      <div align="center">|</div>
    </td>
  </tr>
  <tr> 
    <td> 
      <table border="1" cellpadding="3" align="center">
        <tr> 
          <th nowrap> 
            <div align="center"><font face="MS Sans Serif" size="-1">MDI Child 
              1 </font></div>
          </th>
        </tr>
      </table>
    </td>
    <td> 
      <table border="1" cellpadding="3" align="center">
        <tr> 
          <th nowrap> 
            <div align="center"><font face="MS Sans Serif" size="-1">MDI Child 
              2 </font></div>
          </th>
        </tr>
      </table>
    </td>
    <td> 
      <table border="1" cellpadding="3" align="center">
        <tr> 
          <th nowrap> 
            <div align="center"><font face="MS Sans Serif" size="-1">MDI Child 
              3 </font></div>
          </th>
        </tr>
      </table>
    </td>
    <td> 
      <table border="1" cellpadding="3" align="center">
        <tr> 
          <th nowrap> 
            <div align="center"><font face="MS Sans Serif" size="-1">MDI Child 
              4 </font></div>
          </th>
        </tr>
      </table>
    </td>
    <td> 
      <table border="1" cellpadding="3" align="center">
        <tr> 
          <th nowrap> 
            <div align="center"><font face="MS Sans Serif" size="-1">MDI Child 
              n </font></div>
          </th>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p><font face="MS Sans Serif" size="-1"><b>Figure 1. The hierachy of an MDI application</b></font></p>
<h3><font face="Tahoma">Creating the Frame Window</font></h3>
<p><font face="MS Sans Serif" size="-1">Now we can turn our attention to the detail. 
  First of all you need to create a frame window. It's created the same way as 
  the normal window: by calling CreateWindowEx. There are two major differences 
  from a normal window.</font></p>
<p><font face="MS Sans Serif" size="-1">The first difference is that you <b>MUST</b> 
  call <font color="#000099"><b>DefFrameProc</b></font> instead of <font color="#990099"> 
  <b> DefWindowProc</b></font> to process the Windows messages your window don't 
  want to handle. This is one way to let Windows do the dirty job of maintaining 
  MDI application for you. If you forget to use <font color="#000099"> <b>DefFrameProc</b></font>, 
  your application won't get the MDI feature. Period. <font color="#000099"><b>DefFrameProc</b></font> 
  has the following syntax:</font></p>
<blockquote> 
  <pre align="left"><font face="MS Sans Serif" size="-1"><b>DefFrameProc proc hwndFrame:DWORD,    
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hwndClient:DWORD,
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uMsg:DWORD, 
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wParam:DWORD, 
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lParam:DWORD</b></font></pre>
</blockquote>
<p><font face="MS Sans Serif" size="-1">If you compare <font color="#003399"><b>DefFrameProc</b></font> 
  with <font color="#000099"><b>DefWindowProc</b></font>, you'll notice that the 
  only difference between them is that <font color="#000099"><b>DefFrameProc</b></font> 
  has 5 parameters while <font color="#003399"><b>DefWindowProc</b></font> has 
  only 4. The extra parameter is the handle to the client window. This handle 
  is necessary so Windows can send MDI-related messages to the client window.</font></p>
<p><font face="MS Sans Serif" size="-1">The second difference is that, you must 
  call <font color="#000099"><b>TranslateMDISysAccel</b></font> in the message 
  loop of your frame window. This is necessary if you want Windows to handle MDI-related 
  accelerator key strokes such as Ctrl+F4, Ctrl+Tab for you. It has the following 
  syntax: </font></p>
<blockquote> 
  <pre><font face="MS Sans Serif" size="-1"><b>TranslateMDISysAccel proc hwndClient:DWORD,
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lpMsg:DWORD </b></font></pre>
</blockquote>
<p><font face="MS Sans Serif" size="-1">The first parameter is the handle to the 
  client window. This should not come as a surprise to you because it's the client 
  window that is the parent of all MDI child windows. The second parameter is 
  the address of the MSG structure you filled by calling <font color="#000099"><b>GetMessage</b></font>. 
  The idea is to pass the MSG structure to the client window so it could examine 
  if the MSG structure contains the MDI-related keypresses. If so, it processes 
  the message itself and returns a non-zero value, otherwise it returns FALSE.</font></p>
<p><font face="MS Sans Serif" size="-1">The steps in creating the frame window 
  can be summarized as follows:</font></p>
<ol>
  <li><font face="MS Sans Serif" size="-1">Fill in the WNDCLASSEX structure as 
    usual</font></li>
  <li><font face="MS Sans Serif" size="-1">Register the frame window class by 
    calling <font color="#000099"><b>RegisterClassEx</b></font></font></li>
  <li><font face="MS Sans Serif" size="-1">Create the frame window by calling 
    <font color="#000099"> <b>CreateWindowEx</b></font></font></li>
  <li><font face="MS Sans Serif" size="-1">Within the message loop, call <font color="#000099"><b>TranslateMDISysAccel</b></font>.</font></li>
  <li><font face="MS Sans Serif" size="-1">Within the window procedure, pass the 
    unprocessed messages to <font color="#000099"><b>DefFrameProc</b></font> instead 
    of <font color="#000099"><b>DefWindowProc</b></font>.</font></li>
</ol>
<h3><font face="Tahoma">Creating the Client Window</font></h3>
<p><font face="MS Sans Serif" size="-1">Now that we have the frame window, we 
  can create the client window. The client window class is pre-registered by Windows. 
  The class name is &quot;MDICLIENT&quot;. You also need to pass the address of 
  a <font color="#990099"><b>CLIENTCREATESTRUCT</b></font> structure to <font color="#000099"><b>CreateWindowEx</b></font>. 
  This structure has the following definition:</font></p>
<blockquote> 
  <pre><font face="MS Sans Serif" size="-1"><b>CLIENTCREATESTRUCT struct
   </b></font><b><font face="MS Sans Serif" size="-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hWindowMenu    dd ?
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idFirstChild    dd ?
CLIENTCREATESTRUCT ends</font></b></pre>
</blockquote>
<p><font face="MS Sans Serif" size="-1"><b>hWindowMenu</b></font><font face="MS Sans Serif" size="-1"> 
  is the handle to the submenu that Windows will append the list of MDI child 
  window names. This feature requires a little explanation. If you ever use an 
  MDI application like Microsoft Word before, you'll notice that there is a submenu 
  named &quot;window&quot; which, on activation, displays various menuitems related 
  to window management and at the bottom, the list of the MDI child window currently 
  opened. That list is internally maintained by Windows itself: you don't have 
  to do anything special for it. Just pass the handle of the submenu you want 
  the list to appear in <b>hWindowMenu</b> and Windows will handle the rest. Note 
  that the submenu can be <b>ANY</b> submenu:it doesn't have to be the one that 
  is named &quot;window&quot;. The bottom line is that, you <b>should</b> pass 
  the handle to the submenu you want the window list to appear. If you don't want 
  the list, just put NULL in <b>hWindowMenu</b>. You get the handle to the submenu 
  by calling <font color="#000099"><b>GetSubMenu</b></font>.</font></p>
<p><font face="MS Sans Serif" size="-1"><b>idFirstChild</b> is the ID of the <b>first</b> 
  MDI child window. Windows increments the ID for each new MDI child window the 
  application created. For example, if you pass 100 to this field, the first MDI 
  child window will have the ID of 100, the second one will have the ID of 101 
  and so on. This ID is sent to the frame window via WM_COMMAND when the MDI child 
  window is selected from the window list. Normally you'll pass this &quot;unhandled&quot; 
  WM_COMMAND messages to DefFrameProc. I use the word &quot;unhandled&quot; because 
  the menuitems in the window list are not created by your application thus your 
  application doesn't know their IDs and doesn't have the handler for them. This 
  is another special case for the MDI frame window: if you have the window list, 
  you must modify your WM_COMMAND handler a bit like this:</font></p>
<blockquote> 
  <pre><b><font face="MS Sans Serif" size="-1">.elseif uMsg==WM_COMMAND<br>      .if lParam==0			; this message is generated from a menu
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mov eax,wParam<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.if ax==IDM_CASCADE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.....<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.elseif ax==IDM_TILEVERT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.....
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.else<br><font color="#CC0033">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;invoke DefFrameProc, hwndFrame, hwndClient, uMsg,wParam, lParam<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.endif</font></b></pre>
</blockquote>
<p><font face="MS Sans Serif" size="-1">Normally, you would just ignore the messages 
  from unhandled cases. But In the MDI case, if you ignore them, when the user 
  clicks on the name of an MDI child window in the window list, that window won't 
  become active. You need to pass them to <font color="#003399"><b>DefFrameProc</b></font> 
  so they can be handled properly.</font></p>
<p><font face="MS Sans Serif" size="-1">A caution on the value of <b>idFirstChild</b>: 
  you should not use 0. Your window list will not behave properly, ie. the check 
  mark will not appear in front of the name of the first MDI child even though 
  it's active. Choose a safe value such as 100 or above.</font></p>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
福利91精品一区二区三区| 99久久精品免费看国产| 亚洲情趣在线观看| 精品日韩一区二区三区| 在线观看一区日韩| 国产成人精品一区二区三区网站观看| 亚洲国产成人91porn| 中文字幕av一区二区三区高| 日韩欧美高清dvd碟片| 欧美性生交片4| 成人精品小蝌蚪| 国内欧美视频一区二区| 五月激情综合婷婷| 亚洲最新视频在线观看| 国产精品视频九色porn| 精品久久久久久无| 欧美精品亚洲一区二区在线播放| 91农村精品一区二区在线| 国产乱子伦一区二区三区国色天香 | 国产精品一色哟哟哟| 日本欧美在线看| 午夜精品影院在线观看| 亚洲欧洲性图库| 国产精品视频免费| 亚洲国产精品黑人久久久| 精品成人一区二区| 亚洲精品写真福利| 国产欧美日韩激情| 久久久夜色精品亚洲| 久久午夜羞羞影院免费观看| 日韩欧美国产一区二区在线播放| 欧美区视频在线观看| 欧美日韩国产乱码电影| 欧美性猛片xxxx免费看久爱 | 欧美一区二区人人喊爽| 欧美日韩卡一卡二| 欧美少妇bbb| 欧美性猛交xxxx乱大交退制版| 色婷婷av久久久久久久| 91国内精品野花午夜精品| 91黄视频在线观看| 欧美日韩一区二区三区不卡| 欧美日韩综合一区| 欧美电影在线免费观看| 欧美一区二区三区免费大片| 91精品国产入口| 精品毛片乱码1区2区3区| 久久嫩草精品久久久精品| 国产午夜精品福利| 国产精品国产三级国产aⅴ入口| 国产精品成人一区二区艾草| 亚洲免费av高清| 午夜精品一区在线观看| 日本成人中文字幕| 国产在线日韩欧美| 福利电影一区二区三区| 色婷婷综合中文久久一本| 欧美日韩激情一区二区三区| 日韩免费看的电影| 中文字幕乱码久久午夜不卡| 自拍视频在线观看一区二区| 亚洲一区二区三区视频在线 | 国产精品天美传媒沈樵| 一区二区视频免费在线观看| 日韩av一区二区在线影视| 国产美女精品人人做人人爽| 91丨porny丨首页| 欧美日本在线播放| 久久免费视频色| 亚洲激情图片一区| 久久成人羞羞网站| hitomi一区二区三区精品| 欧美三区免费完整视频在线观看| 日韩一区二区三区高清免费看看| 国产亚洲成aⅴ人片在线观看| 中文字幕亚洲电影| 日本不卡一二三区黄网| 成人精品国产一区二区4080| 欧美日韩综合不卡| 国产欧美日本一区视频| 亚洲成人av电影| 高清不卡一区二区| 欧美日韩国产影片| 欧美国产日韩a欧美在线观看| 午夜视频在线观看一区| 国产美女精品一区二区三区| 欧美在线你懂得| 欧美激情在线一区二区| 丝袜美腿亚洲综合| 99国产欧美另类久久久精品| 精品三级在线观看| 亚洲一区免费在线观看| 欧美一区二区三区在线看| 国产精品护士白丝一区av| 免费精品视频最新在线| 91国产视频在线观看| 国产女主播视频一区二区| 日本不卡视频在线观看| 91久久一区二区| 中文字幕av在线一区二区三区| 男人的天堂久久精品| 色婷婷av一区二区三区软件 | 国产成人精品亚洲日本在线桃色| 欧美人xxxx| 一区二区三区四区不卡视频| 国产成人h网站| 精品理论电影在线| 日本sm残虐另类| 色哟哟一区二区在线观看| 国产精品日韩成人| 精品一区二区三区不卡| 911精品国产一区二区在线| 一区二区三区在线观看欧美| 99精品一区二区三区| 欧美激情一区二区| 国产馆精品极品| 26uuu亚洲| 久久国产精品72免费观看| 91精品麻豆日日躁夜夜躁| 亚洲国产日韩一区二区| 欧美午夜电影网| 亚洲男人天堂av| 91麻豆国产福利在线观看| 亚洲欧洲av在线| aaa国产一区| 国产精品久久久久婷婷| 懂色av中文一区二区三区| 久久精品免费在线观看| 国产盗摄一区二区三区| 精品999在线播放| 国产精品一区专区| 日本一区二区三区dvd视频在线| 韩国精品主播一区二区在线观看 | 91视频免费看| 综合网在线视频| 91久久精品一区二区三| 一区二区三区成人| 欧美性猛片xxxx免费看久爱| 亚洲成人7777| 日韩欧美国产一区二区三区 | 亚洲欧美影音先锋| 亚洲制服欧美中文字幕中文字幕| 欧美天堂一区二区三区| 狠狠色综合播放一区二区| 国产精品私人自拍| 欧美日韩精品福利| 亚洲午夜一二三区视频| 欧美日韩国产一级片| 奇米精品一区二区三区四区 | 欧美性猛交xxxx乱大交退制版| 亚洲成年人网站在线观看| **性色生活片久久毛片| 色欧美片视频在线观看| 亚洲一区二区三区四区的| 91精品国产丝袜白色高跟鞋| 激情六月婷婷久久| 成人免费在线视频| 欧美色涩在线第一页| 久久成人综合网| 国产精品狼人久久影院观看方式| 日本福利一区二区| 免费欧美日韩国产三级电影| 久久精品视频在线免费观看 | 欧美人牲a欧美精品| 久久不见久久见免费视频7| 久久九九久久九九| 色美美综合视频| 久久国产精品免费| 国产精品久久久久aaaa樱花| 欧美日韩国产一二三| 国产曰批免费观看久久久| 亚洲欧美日韩国产中文在线| 日韩一区二区三区免费看 | 亚洲靠逼com| 日韩欧美在线123| 不卡的av电影在线观看| 天天综合色天天综合色h| 国产欧美一区二区精品忘忧草 | 三级一区在线视频先锋 | 中文字幕av在线一区二区三区| 欧洲一区二区av| 国产呦精品一区二区三区网站| 自拍视频在线观看一区二区| 日韩欧美资源站| 91麻豆免费在线观看| 韩国女主播一区| 亚洲一区二区三区四区的| 国产欧美一区二区精品性| 3d动漫精品啪啪| 色婷婷一区二区三区四区| 国产一区二区影院| 日韩avvvv在线播放| 韩国女主播成人在线| 欧美日韩高清一区二区不卡| 波多野结衣精品在线| 免费一区二区视频| 一区二区三区在线播放| 久久久久久久久久久久久夜| 欧美美女一区二区在线观看| 99久久精品免费看国产免费软件|