• <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
            亚洲精品tv久久久久| 久久久久久久免费视频| 亚洲伊人久久成综合人影院| 狠狠久久综合伊人不卡| 婷婷久久综合九色综合九七| 一本一道久久综合狠狠老| 久久精品国产亚洲精品2020| 麻豆AV一区二区三区久久| 国产精品美女久久久久av爽| 亚洲一区精品伊人久久伊人| 亚洲欧美日韩久久精品第一区| 久久被窝电影亚洲爽爽爽| 美女久久久久久| 国产农村妇女毛片精品久久| 一本久久免费视频| 成人妇女免费播放久久久| 性做久久久久久久| 色综合合久久天天综合绕视看| 日韩精品久久久久久免费| 99久久亚洲综合精品成人| 人妻无码中文久久久久专区| 99久久免费只有精品国产| 久久99久久99精品免视看动漫| 久久婷婷五月综合97色直播| 久久精品中文闷骚内射| 亚洲国产成人久久综合碰| 一本久久久久久久| 奇米影视7777久久精品| 亚洲精品99久久久久中文字幕| 国产精品久久久久aaaa| 九九99精品久久久久久| 少妇内射兰兰久久| 免费精品久久天干天干| 2019久久久高清456| 久久国产精品免费一区| 狠狠狠色丁香婷婷综合久久五月| 亚洲欧美日韩中文久久| 亚洲国产精品无码久久98| 日韩av无码久久精品免费| 久久精品成人欧美大片| 日韩人妻无码一区二区三区久久|