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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? app_four.html

?? This tutorial attempts to get you started developing with the Win32 API as quickly and clearly as po
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<HTML><LINK HREF="style.css" REL="STYLESHEET" TYPE="text/css"><HEAD><TITLE>App Part 4: Multiple Document Interface</TITLE></HEAD><BODY><FONT SIZE="-1">[ <A HREF="./index.html">contents</A>| <A HREF="http://www.winprog.org/">#winprog</A>]</FONT><HR><H1>App Part 4: Multiple Document Interface</H1><P>Example: app_four</P><IMG SRC="images/app_four.gif" ALT="[images/app_four.gif]" ALIGN="right"><H2>MDI Overview</H2>First a bit of background... Every window has a <I>Client Area</I>, this iswhere most programs draw images, place controls etc... the Client Area is notseperate from the window itself, it is simply a smaller specialised regionof it.  Sometimes a window can be all client area, and nothing else, sometimesthe client area is smaller to make room for menus, titles, scrollbars, etc...<P>In MDI terms, your main window is called the Frame, this is probably theonly window you would have in a SDI (Single Document Interface) program.In MDI there is an additional window, called the <I>MDI Client Window</I>which is a child of your Frame window.Unlike the <I>Client Area</I> it is a complete and seperate window all on it'sown, it has a client area of it's own and probably a few pixels for a border.You never directly handle messages for the MDI Client, it is done by thepre-defined windows class <CODE>"MDICLIENT"</CODE>.  You can communicate withand manipulate the MDI Client and the windows it contains through messages.<P>When it comes to the windows which actually display your document orwhatever your program displays, you send a message to the MDI Client to tell it to create a newwindow of the type you've specified.  The new window is created as a child ofthe MDI Client, not of your Frame window.  This new window is an MDI Child.The MDI Child is a child of the MDI Client, which in turn is a child of theMDI Frame (Getting dizzy yet?).  To make matters worse, the MDI Child willprobably have child windows of its own, for instance the edit control in theexample program for this section. <P>You are responsable for writing two (or more) Window Procedures.  One, just likealways, for your main window(the Frame).  And one more for the MDI Child.  You may alsohave more than one type of Child, in which case, you'll want a seperate windowprocedure for each type. <P>If I've thoroughly confused you now talking about MDI Clients and things, this diagram may clear things up a little better:<P ALIGN="CENTER"><IMG SRC="images/mdi_diagram.gif" ALT="[images/mdi_diagram.gif]" BORDER="1"></P><H2>Getting Started with MDI</H2>MDI requires a few subtle changes throughout a program, so please read through this section carefully... chances are that if your MDI program doesn't work or has strange behaviourit's because you missed one of the alterations from a regular program.  <H3>MDI Client Window</H3>Before we create our MDI window we need to make a change to the default message processing that goes on in our Window Procedure... since we're creating a Frame window that willhost an MDI Client, we need to change the <CODE>DefWindowProc()</CODE> call to <CODE>DefFrameProc()</CODE> which addsspecialized message handling for Frame Windows,<PRE CLASS="SNIP">    default:        return DefFrameProc(hwnd, g_hMDIClient, msg, wParam, lParam);</PRE>The next step is to create the MDI Client window itself, as a child of our frame window.We do this in <CODE>WM_CREATE</CODE> as usual...<PRE CLASS="SNIP">    CLIENTCREATESTRUCT ccs;    ccs.hWindowMenu  = GetSubMenu(GetMenu(hwnd), 2);    ccs.idFirstChild = ID_MDI_FIRSTCHILD;    g_hMDIClient = CreateWindowEx(WS_EX_CLIENTEDGE, "mdiclient", NULL,        WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE,        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,        hwnd, (HMENU)IDC_MAIN_MDI, GetModuleHandle(NULL), (LPVOID)&ccs);</PRE>The menu handle is the handle to the popup menu that the MDI client will add items torepresenting each window that is created, allowing the user to select the window they want to activate from the menu, we'll add functionality shortly to handle this case.  In this exampleit's the 3rd popup (index 2) since I've added Edit and Window to the menu after File.<P><CODE>ccs.idFirstChild</CODE> is a number to use as the first ID for the itemsthe Client adds to the Window menu... you want this to be easilydistinguishable from your own menu identifiers so you can handle your menu commandsand pass the Window menu commands to <CODE>DefFrameProc()</CODE> for processing.  In theexample I specify an identifier defined as <CODE>50000</CODE>, high enough that I know noneof my menu command id's will be above it.<P>Now to get this menu to work properly we need to add some special handling to our <CODE>WM_COMMAND</CODE> handler:<PRE CLASS="SNIP">    case WM_COMMAND:        switch(LOWORD(wParam))        {            case ID_FILE_EXIT:                PostMessage(hwnd, WM_CLOSE, 0, 0);            break;            // ... handle other regular IDs ...            // Handle MDI Window commands            default:            {                if(LOWORD(wParam) >= ID_MDI_FIRSTCHILD)                {                    DefFrameProc(hwnd, g_hMDIClient, msg, wParam, lParam);                }                else                 {                    HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE,0,0);                    if(hChild)                    {                        SendMessage(hChild, WM_COMMAND, wParam, lParam);                    }                }            }        }    break;</PRE><P>I've added a <CODE>default:</CODE> case which will catch all commands that I didn't processdirectly and do a check to see if the value is greater than or equal to <CODE>ID_MDI_FIRSTCHILD</CODE>.If it is, then the user has clicked on one of the Window menu items and we sendthe message on to <CODE>DefFrameProc()</CODE> for processing.  <P>If it isn't one of the WindowIDs then I get the handle to the active child window and forward the messageto it for processing.  This allows you to delegate responsibility to the Childwindows for performing certain actions, and allows different child windowsto handle commands in different ways if so desired.  In the example I onlyhandle commands that are global to the program in the Frame window procedure,and send the commands which affect a certain document or child window on to thechild window itself for processsing.<P>Since we're building on the last example, the code to size the MDI client is the same asthe code to resize the edit control in the last example, that takes into account the sizeand position of the tool and status bars so they don't overlap the MDI client window.<P>We also need to modify our message loop a little...<PRE CLASS="SNIP">    while(GetMessage(&Msg, NULL, 0, 0))    {        if (!TranslateMDISysAccel(g_hMDIClient, &Msg))        {            TranslateMessage(&Msg);            DispatchMessage(&Msg);        }    }</PRE>We've added an extra step (<CODE>TranslateMDISysAccel()</CODE>), that checks for the pre-defined accelerator keys, Ctrl+F6 which swtiches to the next window, Ctrl+F4 which closes the Childand so on.  If you don't add in this check you will annoy your users by notproviding the standard behaviour they've gotten used to, or you'll have toimplement it manually.<H3>Child Window Class</H3>In addition to the main window of the program (the Frame window) we need to create newwindow classes for each type of child window we want.  For example you might have oneto display text, and one to display a picture or graph.  In this example we'll only be creating one child type, which will be just like the editor program in the previousexamples.<PRE CLASS="SNIP">BOOL SetUpMDIChildWindowClass(HINSTANCE hInstance){    WNDCLASSEX wc;    wc.cbSize        = sizeof(WNDCLASSEX);    wc.style         = CS_HREDRAW | CS_VREDRAW;    wc.lpfnWndProc   = MDIChildWndProc;    wc.cbClsExtra    = 0;    wc.cbWndExtra    = 0;    wc.hInstance     = hInstance;    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);    wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1);    wc.lpszMenuName  = NULL;    wc.lpszClassName = g_szChildClassName;    wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);    if(!RegisterClassEx(&wc))    {        MessageBox(0, "Could Not Register Child Window", "Oh Oh...",            MB_ICONEXCLAMATION | MB_OK);        return FALSE;    }    else        return TRUE;}</PRE>This is basically identical to registering our regular frame window, there are no particularlyspecial flags here for use with MDI.  We've set the menu as NULL, and the window procedureto point to the child window procedure which we will write next.<H3>MDI Child Procedure</H3>The window procecure for an MDI child is much like any other with a few small exceptions.First of all, default messages are passed to <CODE>DefMDIChildProc()</CODE> instead of <CODE>DefWindowProc()</CODE>.<P>In this particular case, we also want to disable the Edit and Window menu's when they aren't needed (just because it's a nice thing to do), so we handle <CODE>WM_MDIACTIVEATE</CODE>and enable or disable them depending on if our window is getting activated or not.  If youhave multiple types of child window, this is where you could put code to completely change themenu or toolbar or make alterations to other aspects of the program to reflect the actionsand commands that are specific to the type of window being activated.<P>To be even more complete, we can disable the Close and Save File menu items as well, since they aren't

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机免费视频一区二区| 天天做天天摸天天爽国产一区| 欧美日本一区二区在线观看| 99精品1区2区| 色天使色偷偷av一区二区| 色嗨嗨av一区二区三区| 色综合天天综合网天天看片| 99久久精品国产导航| 91免费精品国自产拍在线不卡| 99久久精品免费看| 色狠狠av一区二区三区| 欧美日韩在线精品一区二区三区激情| 欧美少妇xxx| 91精品国产综合久久久久久久 | 日韩精品一区二区三区四区| 欧美一个色资源| 久久综合狠狠综合久久综合88| 精品国产91九色蝌蚪| 国产清纯美女被跳蛋高潮一区二区久久w| 国产视频一区二区在线观看| 国产精品传媒在线| 亚洲成人激情综合网| 亚洲一区二区三区四区五区黄| 亚洲人成精品久久久久久| 亚洲欧美日韩在线播放| 亚洲va中文字幕| 国产在线精品一区二区夜色 | 亚洲国产综合91精品麻豆| 婷婷丁香久久五月婷婷| 另类欧美日韩国产在线| 丁香五精品蜜臀久久久久99网站| 在线精品视频免费播放| 精品欧美一区二区久久| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 亚洲综合视频在线| 国产在线国偷精品免费看| 色综合久久中文字幕| 日韩欧美二区三区| 亚洲精品国产无天堂网2021| 国产美女在线精品| 欧美日韩在线电影| 国产精品二三区| 精品一区二区久久久| 91国偷自产一区二区三区成为亚洲经典 | 午夜精品久久久久久久99水蜜桃 | 欧美mv和日韩mv国产网站| 国产精品高潮呻吟久久| 麻豆免费精品视频| 日本乱码高清不卡字幕| 久久综合狠狠综合久久激情| 亚洲国产婷婷综合在线精品| 国产黄色精品网站| 制服丝袜激情欧洲亚洲| 亚洲欧美二区三区| 国产精品自拍av| 欧美一级免费观看| 亚洲一区二区三区在线播放| eeuss鲁片一区二区三区在线看| 精品欧美一区二区久久| 五月天激情综合| 91免费在线播放| 中文天堂在线一区| 国产一区二区在线观看免费| 日韩视频免费观看高清完整版 | 91老师片黄在线观看| 26uuu国产电影一区二区| 亚洲h动漫在线| 欧美酷刑日本凌虐凌虐| 一区二区三区在线视频观看58| av一区二区三区| 中文字幕不卡的av| 国产一区二区在线免费观看| 精品国产乱码久久久久久夜甘婷婷| 亚洲第一电影网| 欧美人狂配大交3d怪物一区| 亚洲卡通动漫在线| 色婷婷综合久久| 亚洲国产精品久久久久秋霞影院| 欧美性感一类影片在线播放| 亚洲精品国产视频| 欧美日韩在线亚洲一区蜜芽| 午夜精品123| 日韩欧美在线网站| 国产成人亚洲精品狼色在线 | 欧美日韩一区二区三区在线看| 亚洲欧美另类小说| 欧美视频你懂的| 理论片日本一区| 中文字幕乱码亚洲精品一区| 97se亚洲国产综合自在线不卡| 亚洲精品高清视频在线观看| 欧美精品日日鲁夜夜添| 国内精品伊人久久久久av一坑| 久久精品视频网| 色综合咪咪久久| 亚洲va在线va天堂| 日韩视频一区在线观看| 国产精品69毛片高清亚洲| 亚洲视频在线观看三级| 欧美日韩综合不卡| 国产精品影音先锋| 亚洲精品你懂的| 日韩三级电影网址| 国产91精品久久久久久久网曝门 | 日韩女优制服丝袜电影| 成人蜜臀av电影| 一区二区三区自拍| 欧美xxxxx牲另类人与| 不卡的电视剧免费网站有什么| 一区二区激情小说| 久久精品网站免费观看| 欧美视频中文字幕| 粗大黑人巨茎大战欧美成人| 亚洲电影激情视频网站| 国产日韩欧美激情| 欧美精选午夜久久久乱码6080| 国产成人精品www牛牛影视| 亚洲五码中文字幕| 欧美国产一区二区在线观看| 在线欧美日韩国产| 国产福利不卡视频| 爽爽淫人综合网网站| 亚洲欧洲在线观看av| 日韩精品一区二区三区swag | 精品影视av免费| 亚洲黄色片在线观看| 国产欧美一区二区精品婷婷| 欧美日韩高清一区二区不卡| 国产99久久久精品| 韩国中文字幕2020精品| 日韩激情在线观看| 亚洲午夜av在线| 一区二区三区蜜桃| 国产精品青草综合久久久久99| 精品区一区二区| 欧美一级淫片007| 欧美视频中文一区二区三区在线观看 | 亚洲日本在线a| 精品国产乱码久久久久久免费 | 日韩天堂在线观看| 在线免费观看日韩欧美| 99久久国产综合精品女不卡| 粉嫩av一区二区三区| 国产精品99久久久久久久女警| 免费高清在线视频一区·| 香蕉影视欧美成人| 一区二区三区在线视频播放| 亚洲人亚洲人成电影网站色| 日本一区免费视频| 欧美国产日韩a欧美在线观看 | 欧美综合视频在线观看| 91色综合久久久久婷婷| 99精品欧美一区二区三区小说| 国产99一区视频免费| 成人黄色软件下载| 色综合久久中文综合久久97| 一本一本大道香蕉久在线精品 | 欧美三级在线播放| 欧美系列亚洲系列| 777a∨成人精品桃花网| 欧美一区在线视频| 欧美成人免费网站| 精品国产百合女同互慰| 国产亚洲综合在线| 国产精品黄色在线观看| 一区二区三区四区亚洲| 亚洲成人动漫在线免费观看| 美国十次了思思久久精品导航| 精品在线播放午夜| 成人午夜激情视频| 91国偷自产一区二区开放时间| 欧美色男人天堂| 精品欧美乱码久久久久久1区2区| 久久久久99精品一区| 亚洲欧洲av色图| 日韩精品乱码av一区二区| 久久精品国产色蜜蜜麻豆| 国产美女主播视频一区| 99在线热播精品免费| 3d动漫精品啪啪1区2区免费 | 中文字幕制服丝袜成人av| 亚洲欧美国产高清| 麻豆精品新av中文字幕| 成人av动漫网站| 欧美日本在线播放| 国产女人18毛片水真多成人如厕 | 国产午夜亚洲精品午夜鲁丝片| 中文字幕精品一区| 亚洲成人www| 国产成人高清在线| 欧日韩精品视频| 国产欧美一区二区在线| 天天爽夜夜爽夜夜爽精品视频| 激情综合网最新| 欧美亚洲尤物久久| 中日韩免费视频中文字幕| 男女男精品网站| 欧美日韩综合不卡| 亚洲色图欧洲色图| 国产一区在线观看视频|