When the non-modal dialog box is displayed, the activation status of the parent window is not lost.

Source: Internet
Author: User

As follows:CodeCreate a non-Modal Dialog Box

Void cllview: ondialog ()

{

Ctestdlg * pdlg = new ctestdlg;

Pdlg-> Create (idd_dialog1, this );

Pdlg-> showwindow (sw_show );

}

At this time, the created dialog box is activated. It is time for us to activate the parent window without flashing the title box. We only need to make the following changes:

1. Declare p_dlg as the member variable ctestdlg * pdlg and apply for a space for it. pdlg = new ctestdlg;

2. The create dialog box allows the create operation of the subwindow to be executed in oninitdialog of the parent window.

3. display the sub-window, DLG-> showwindow (sw_shownoactivate );

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.