• <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
            <2008年6月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿(1)

            隨筆分類

            隨筆檔案

            相冊

            News

            Program

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            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 陳振輝 閱讀(357) 評論(0)  編輯 收藏 引用 所屬分類: Others
            国产精品久久久久影院色| 日本精品久久久久中文字幕8 | 久久综合久久伊人| 手机看片久久高清国产日韩| 亚洲国产成人久久笫一页| 亚洲综合熟女久久久30p| 久久婷婷国产综合精品| 好久久免费视频高清| 色偷偷91久久综合噜噜噜噜| 97精品依人久久久大香线蕉97| 久久久久久久综合日本亚洲| 久久夜色精品国产亚洲| 99久久亚洲综合精品网站| 中文字幕无码av激情不卡久久| 成人久久久观看免费毛片| 久久久久亚洲爆乳少妇无 | 久久妇女高潮几次MBA| 国产精品青草久久久久福利99| 7777久久久国产精品消防器材 | 国产亚洲欧美成人久久片| 亚洲欧美日韩精品久久亚洲区 | 午夜精品久久久久久中宇| 欧美无乱码久久久免费午夜一区二区三区中文字幕| 一本色道久久88综合日韩精品| 国产亚洲综合久久系列| 久久久久久久97| 蜜臀久久99精品久久久久久| 国产精品无码久久四虎| 91精品国产综合久久香蕉| 国内精品久久久人妻中文字幕| 午夜天堂av天堂久久久| 国内精品久久久久影院薰衣草 | 超级碰碰碰碰97久久久久| 久久精品无码一区二区app| 亚洲国产精品久久久久久| 久久精品国产福利国产秒| 青青青青久久精品国产 | 亚洲国产成人久久笫一页| 久久影院亚洲一区| 99久久香蕉国产线看观香| 东方aⅴ免费观看久久av|