Ctabctrl controls display bitmap or icon

Source: Internet
Author: User
Bool cmypropsheet: oninitdialog () {bool bresult = cpropertysheet: oninitdialog (); m_imagetab.create (idb_tabimages, 13, 1, RGB (255,255,255 )); // create a cimagelist class ctabctrl * PTAB = gettabcontrol (); PTAB-> setimagelist (& m_imagetab); // The tab control sets imagelist // you can also choose not to specify pixels, you can use the add method of cimagelist to add bitmap or tc_item tcitem; tcitem. mask = tcif_image; For (INT I = 0; I <3; I ++) {tcitem. iimage = I; PTAB-> setitem (I, & tcitem); // display the sequence number of imagelist} return bresult;} Let's create an example of displaying ICO ctabctrl m_tabpanel; cimagelist m_imagelist; m_imagelist.create (16, 16, ilc_color8 | ilc_mask, 3, 0); m_imagelist.add (: afxgetapp ()-> loadicona (idi_icon1); m_imagelist.add (: afxgetapp () -> loadicona (idi_icon2); m_imagelist.add (: afxgetapp ()-> loadicona (idi_icon3); then (& m_imagelist); m_tabpanel.insertitem (0, _ T ("configuration parameter"), 0); m_tabpanel.insertitem (1, _ T ("add number"), 1); m_dlgpage1.create (idd_dlg_one, getdlgitem (idc_tab_panel )); // dialog box m_dlgpage2.create (idd_dlg_two, getdlgitem (idc_tab_panel ));

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.