Menu, toolbar, Status Bar, and title bar are not loaded in a document-style application.

Source: Internet
Author: User

1. Remove the toolbar, Status Bar, and title bar int cmainframe: oncreate (maid) {If (cframewnd: oncreate (maid) =-1) Return-1; /* // remove the toolbar and status bar if (! M_wndtoolbar.createex (this, tbstyle_flat, ws_child | ws_visible | cbrs_top | cbrs_gripper | cbrs_tooltips | cbrs_flyby | cbrs_size_dynamic) |! M_wndtoolbar.loadtoolbar (idr_mainframe) {trace0 ("failed to create toolbar/N"); Return-1; // fail to create} If (! M_wndstatusbar.create (this) |! M_wndstatusbar.setindicators (indicators, sizeof (indicators)/sizeof (uint) {trace0 ("failed to create status bar/N"); Return-1; // fail to create} // todo: delete these three lines if you don't want the toolbar to // be dockable evaluate (cbrs_align_any); enabledocking (cbrs_align_any ); dockcontrolbar (& m_wndtoolbar); */modifystyle (ws_caption, 0); // remove the window title bar return 0;} 2. Do not load the system menu in main In the precreatewindow () function of frm. cpp, bool cmainframe: precreatewindow (createstruct & CS) {If (! Cframewnd: precreatewindow (CS) return false; // todo: Modify the window class or styles here by modifying // The createstruct CS. style = ws_overlapped | ws_border; return true;} 3. All variables of theapp are defined. in the CPP file, find the initinstance () function and replace idr_mainframe with null in the sentence "pdoctemplate = new csingledoctemplate.

Note: You must generate a version of ralose during compilation.

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.