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 );