• <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 力為 閱讀(2015) 評論(0)  編輯 收藏 引用 所屬分類: 6. COM&ATL&WTL
            久久精品免费一区二区| 久久青青草原精品国产不卡| 久久久久亚洲AV无码观看 | 久久久久亚洲av成人网人人软件| 久久久久久极精品久久久 | 亚洲精品tv久久久久久久久| 国产成人精品久久| A级毛片无码久久精品免费| 色综合合久久天天给综看| 亚洲国产精品成人久久| 久久高清一级毛片| 亚洲精品美女久久久久99| 精品国产热久久久福利| 无码AV波多野结衣久久| 精品久久久久久无码国产| 久久久久亚洲AV无码专区体验| 久久WWW免费人成—看片| 久久狠狠高潮亚洲精品| 久久本道久久综合伊人| 久久狠狠色狠狠色综合| 久久久久久国产精品美女| 18岁日韩内射颜射午夜久久成人 | 久久国产乱子精品免费女| 久久无码AV中文出轨人妻| 国产精品xxxx国产喷水亚洲国产精品无码久久一区| 久久久久这里只有精品| yellow中文字幕久久网| 国产精品久久久久jk制服| 三上悠亚久久精品| 久久午夜伦鲁片免费无码| 久久久久久久久久久精品尤物| 日韩美女18网站久久精品| 久久精品亚洲福利| 久久久WWW成人免费毛片| 国产福利电影一区二区三区,免费久久久久久久精 | 久久免费视频1| 久久综合亚洲色HEZYO国产| 久久久综合香蕉尹人综合网| 久久91精品综合国产首页| 精品久久久久久久久久中文字幕| 26uuu久久五月天|