About MFC (question is very easy) Just drop by once and go.(T)

Asked 2 years ago, Updated 2 years ago, 117 views

First of all, if I can tell you about my situation, I'm going to do a project with MFC in a single document, and I'm going to do a basic class with FormView And I added a new dialog in the Resource View tab and a class for that dial. What I need is that the first time I run an app, I need a class called ViewerView to create a dialog Then, you have to launch the newly created dialog.

But... I looked it up and found that there was no function called after the basic class dialog was completed. If you have that function, you can just do DoModal(); and float it' ㅠ<

Masters... Please. Is there any way?

mfc formview viewerview domodal

2022-09-22 18:48

1 Answers

https://docs.microsoft.com/ko-kr/cpp/mfc/reference/cdialog-class?view=vs-2019#domodal

Please refer to the link above and process it as the return value of the dialog as shown in the example below.

if (tempDialog.DoModal() == IDOK)   
{
    // Action at end of dialog
    if(tempDialg2.DoModal() ==IDOK)
    {
        // After the second dialog,
    }
}


2022-09-22 18:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.