Common Xtreme toolkit code

Source: Internet
Author: User

M_mystatic_menuicon.create (_ T (""), ws_child | ws_visible | ss_bitmap | ss_centerimage, crect (1234, 24, 24), pmenubar, 0 X );
M_mystatic_menuicon.setbitmap (: loadbitmap (afxgetapp ()-> m_hinstance, (lpctstr) idb_bitmap1 ));

Xtp_commandbars_iconsinfo * piconsinfo = xtppaintmanager ()-> geticonsinfo (); // you can specify the attributes of an icon.
Piconsinfo-> busedisabledicons = true;
Piconsinfo-> biconswithshadow = false;
Piconsinfo-> busefadedicons = true;

Redrawwindow (0, 0, rdw_invalidate | rdw_updatenow | rdw_erase | rdw_allchildren );
Getcommandbars ()-> getpaintmanager ()-> refreshmetrics ();
Getcommandbars ()-> redrawcommandbars ();

Modifystyle (ws_thickframe, 0 );
Modifystyle (0, ws_thickframe); // remove the gripper dragged under the status bar

Pmenubar-> modifybarstyle (cbrs_gripper, 0); // remove the gripper in front of the menu or toolbar
Pmenubar-> enabledocking (xtpflaghidewrap | xtpflagstretched); // menu or toolbar Extension

Cxtpcommandbarsoptions * poptions = pcommandbars-> getcommandbarsoptions ();
Poptions-> bshowexpandbuttonalways = false; // The extension button is not displayed.

Ptoolbar-> showtextbelowicons (); // The word is displayed under the toolbar icon.

// Set the small icon in front of the menu item
Uint ncommands [] = {id_tasks_begin, id_tasks_stop, id_new_download, id_tasks_delete,
Id_open_path, id_help, id_homepage, id_app_exit, id_tasks_up, id_tasks_down };
Xtpimagemanager ()-> seticons (idb_smallicon, ncommands, sizeof (ncommands)/sizeof (uint), csize (16, 16 ));

// Set skin and Style
Xtppaintmanager ()-> setcustomtheme (New cwinmounttheme (); // a new style class written by yourself
Xtppaintmanager ()-> settheme (xtpthemenativewinxp); //

// Above all windows
Setwindowpos (& wndtopmost, 0, 0, 0, 0, swp_nosize | swp_noreposition | swp_nomove );

// The subwindow is always under the main window
Cchilddlg * pdlg;
Pdlg = new cchilddlg;
Pdlg-> Create (idd_dialog1, getdesktopwindow ());
Pdlg-> setwindowpos (this, 0, 0, 30, 50, swp_nosize );
Pdlg-> showwindow (sw_show );
Cwnd * pmainwnd = afxgetmainwnd ();
Pmainwnd-> setwindowpos (& wndtopmost, 0, 0, 0, 0, swp_nosize | swp_nomove );
 
 
 

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.