• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 3  文章 - 3  trackbacks - 0
            <2025年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            常用鏈接

            留言簿(1)

            隨筆分類

            隨筆檔案

            相冊(cè)

            News

            Program

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            Superclassing is a technique that allows an application to create a new window class with the basic functionality of the existing class, plus enhancements provided by the application. A superclass is based on an existing window class called the base class. Frequently, the base class is a system global window class such as an edit control, but it can be any window class.

            A superclass has its own window procedure, called the superclass procedure. The superclass procedure can take three actions upon receiving a message: It can pass the message to the original window procedure, modify the message and pass it to the original window procedure, or process the message and not pass it to the original window procedure. If the superclass procedure processes a message, it can do so before, after, or both before and after it passes the message to the original window procedure.

            Unlike a subclass procedure, a superclass procedure can process window creation messages (WM_NCCREATE, WM_CREATE, and so on), but it must also pass them to the original base-class window procedure so that the base-class window procedure can perform its initialization procedure.

            To superclass a window class, an application first calls the GetClassInfo function to retrieve information about the base class. GetClassInfo fills a WNDCLASS structure with the values from the WNDCLASS structure of the base class. Next, the application copies its own instance handle into the hInstance member of the WNDCLASS structure and copies the name of the superclass into the lpszClassName member. If the base class has a menu, the application must provide a new menu with the same menu identifiers and copy the menu name into the lpszMenuName member. If the superclass procedure processes the WM_COMMAND message and does not pass it to the window procedure of the base class, the menu need not have corresponding identifiers. GetClassInfo does not return the lpszMenuName, lpszClassName, or hInstance member of the WNDCLASS structure.

            An application must also set the lpfnWndProc member of the WNDCLASS structure. The GetClassInfo function fills this member with the address of the original window procedure for the class. The application must save this address, to pass messages to the original window procedure, and then copy the address of the superclass procedure into the lpfnWndProc member. The application can, if necessary, modify any other members of the WNDCLASS structure. After it fills the WNDCLASS structure, the application registers the superclass by passing the address of the structure to the RegisterClass function. The superclass can then be used to create windows.

            Because superclassing registers a new window class, an application can add to both the extra class bytes and the extra window bytes. The superclass must not use the original extra bytes for the base class or the window for the same reasons that an instance subclass or a global subclass should not use them. Also, if the application adds extra bytes for its use to either the class or the window instance, it must reference the extra bytes relative to the number of extra bytes used by the original base class. Because the number of bytes used by the base class may vary from one version of the base class to the next, the starting offset for the superclass's own extra bytes may also vary from one version of the base class to the next.

            posted on 2008-06-01 17:39 陳振輝 閱讀(354) 評(píng)論(0)  編輯 收藏 引用 所屬分類: Others

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            国产精品欧美久久久久天天影视 | 97久久国产露脸精品国产| 性做久久久久久久久久久| 国产偷久久久精品专区| 精品国际久久久久999波多野| 99热精品久久只有精品| 伊人色综合九久久天天蜜桃| 久久久噜噜噜久久熟女AA片 | 亚洲午夜无码久久久久小说| 久久Av无码精品人妻系列| 国产精品综合久久第一页| 亚洲综合精品香蕉久久网| 国产L精品国产亚洲区久久| 亚洲国产精品无码久久98| 久久九九免费高清视频| 国产麻豆精品久久一二三| 亚洲国产日韩综合久久精品| 亚洲狠狠久久综合一区77777| 国产激情久久久久久熟女老人| 国产精品免费久久久久久久久| 99精品久久精品| 欧美一区二区三区久久综| 亚洲国产综合久久天堂| 久久国产综合精品五月天| 久久99国产精品二区不卡| 亚洲精品无码久久久久sm| 久久这里的只有是精品23| 亚洲国产成人精品无码久久久久久综合 | 久久婷婷五月综合97色直播| 久久免费小视频| 国产精品久久自在自线观看| 香蕉久久av一区二区三区| 思思久久99热只有频精品66| 久久久久综合国产欧美一区二区| 香蕉久久一区二区不卡无毒影院| 精品熟女少妇a∨免费久久| 日产精品久久久久久久| 久久综合精品国产二区无码| 亚洲第一极品精品无码久久| 久久久久亚洲AV片无码下载蜜桃| 亚洲国产另类久久久精品黑人|