• <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>

            力為的技術博客

            聯系 聚合 管理
              154 Posts :: 1 Stories :: 561 Comments :: 0 Trackbacks

            It's said in MSDN that:“Microsoft Windows assumes that all of a toolbar's bitmapped images are the same size. ” So the question is : How can we implement a toolbar?with different sized images, which is just like as Google Toolbar?


            There are two ways:

            1.To use double ImageLists

            You should note that the image's size of the toolbar is decided by?the first ImageList, even though the second one is different from the first one. So after registering double ImageLists, you also have to reset the button's size to suit the second imagelist.
            This is the code segment:

            a. setting double imagelist
            ????//1st?ImageList, with normal images
            ????m_hImage1st?=?ImageList_Create(16,?16,?ILC_COLOR24,?1,?0);
            ????
            int?nIdx11?=?ImageList_Add(m_hImageFirst,,NULL);
            ????
            int?nIdx12?=??ImageList_Add(m_hImageFirst,,NULL);

            ????????
            //2nd?ImageList, with bigger image
            ????m_hImage2nd?=?ImageList_Create(48,?16,?ILC_COLOR24,?2,?0);
            ????
            int?nIdx21?=ImageList_Add(m_hImage2nd?,,NULL);

            ????
            //?add?imagelists, the order is very important
            ????::SendMessage(m_hWnd,?CCM_SETVERSION,?(WPARAM)?5,?0);
            ????::SendMessage(m_hWnd,?TB_SETIMAGELIST,?
            0,?(LPARAM)m_hImage1st);
            ????::SendMessage(m_hWnd,?TB_SETIMAGELIST,?
            1,?(LPARAM)m_hImage2nd);

            ????
            //?set?button?image
            ????pTBBtn[0].iBitmap?=?MAKELONG(nIdx21,?1);
            ????pTBBtn[
            1].iBitmap?=?MAKELONG(nIdx11,?0);
            ????pTBBtn[
            2].iBitmap?=?MAKELONG(nIdx12,?0);

            b. resize the button with bigger image
            ????TBBUTTONINFO?tbi;????????????
            ????tbi.cbSize?
            =?sizeof(TBBUTTONINFO);
            ????tbi.dwMask?
            =?TBIF_STYLE?|?TBIF_SIZE;
            ????tbi.fsStyle?
            =?pTBBtn[0].fsStyle;
            ????tbi.cx?
            =?48;
            ????????::SendMessage(m_hWnd,?TB_SETBUTTONINFO,?nID,?(LPARAM)
            &tbi);

            And now, ?the first button of the toolbar has different sized image from others.

            2. To use Rebar control

            A rebar?control?may have many toolbars, so you can create two toolbars with different sized imagelist.(See MSDN.). But we can only create one toolbar in WTL by default, so it's a little complex to implement?using WTL in this method. You can try?this?in MFC.
            posted on 2006-06-11 15:39 力為 閱讀(2018) 評論(0)  編輯 收藏 引用 所屬分類: 6. COM&ATL&WTL
            9191精品国产免费久久| 超级97碰碰碰碰久久久久最新| 一级做a爰片久久毛片看看| 午夜久久久久久禁播电影| 伊人久久免费视频| 久久久久亚洲精品中文字幕| 69国产成人综合久久精品| 国产精品久久久久久久久软件 | 日产精品久久久久久久| 91麻豆精品国产91久久久久久| 精品国产综合区久久久久久 | 9191精品国产免费久久| 波多野结衣久久一区二区 | 久久天天躁狠狠躁夜夜avapp| 99久久亚洲综合精品成人| 伊人久久大香线蕉综合5g | 久久久久国色AV免费观看| 久久精品国产一区二区三区日韩| 亚洲精品tv久久久久久久久 | 久久久精品2019免费观看| 日韩精品久久无码中文字幕| 久久99精品九九九久久婷婷| 久久偷看各类wc女厕嘘嘘 | 久久精品九九亚洲精品天堂| 国内精品伊人久久久久777| 人人妻久久人人澡人人爽人人精品 | 国产精品欧美久久久久天天影视| 亚洲精品无码久久久久sm| 日韩影院久久| 99久久国产宗和精品1上映| 久久国产视频网| 久久人妻少妇嫩草AV无码蜜桃| 26uuu久久五月天| 国产精品久久久99| 91秦先生久久久久久久| 色成年激情久久综合| 久久夜色撩人精品国产| 久久久久亚洲?V成人无码| 国产福利电影一区二区三区久久久久成人精品综合 | 久久国产视频99电影| 久久精品国产亚洲一区二区三区|