• <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
            一本一道久久a久久精品综合| 久久精品国内一区二区三区| 日韩久久久久中文字幕人妻| 国产99久久久国产精品小说| 精品伊人久久大线蕉色首页| 久久国产乱子精品免费女| 国产精品99久久精品爆乳| 欧美一区二区久久精品| 国内精品久久久久| 中文字幕无码久久久| 91精品国产9l久久久久| 国产亚洲欧美精品久久久| 精品国产福利久久久| 久久久无码精品亚洲日韩京东传媒 | 久久国产精品无码一区二区三区| 99久久国产热无码精品免费久久久久| 亚洲精品97久久中文字幕无码 | 91久久香蕉国产熟女线看| 亚洲另类欧美综合久久图片区| 久久中文骚妇内射| 亚洲日韩欧美一区久久久久我| 精品国产乱码久久久久久郑州公司| 欧美无乱码久久久免费午夜一区二区三区中文字幕 | 久久亚洲精精品中文字幕| 久久99精品久久久久久噜噜| 国产精品一久久香蕉产线看| 久久久国产精华液| 久久久久国产精品三级网| 久久狠狠色狠狠色综合| 国内精品伊人久久久久AV影院| 久久亚洲精品无码aⅴ大香| 深夜久久AAAAA级毛片免费看| 精品国产乱码久久久久久浪潮| 久久青草国产手机看片福利盒子| AV狠狠色丁香婷婷综合久久| 国色天香久久久久久久小说| 伊人色综合九久久天天蜜桃| 国产女人aaa级久久久级| 久久国产影院| 久久久久黑人强伦姧人妻| 亚洲欧美精品一区久久中文字幕|