Create a dialog box-based application

Source: Internet
Author: User

 

InVC provides the "dialog box-based application" function. You need to select the "dialog box-based application" in the first step of using AppWizard ",.

VC generates code containing the derived classes of the application and dialog box. The following code is displayed in the InitInstance () member function of the application class:

BOOL CMy58_s1App: InitInstance ()
  
{
  
CMy58_s1Dlg dlg;
  
M_pMainWnd = & dlg;
  
Int nResponse = dlg. DoModal ();
  
If (nResponse = IDOK)
  
{
  
// TODO: Place code here to handle when the dialog is
  
//Dismissed with OK
  
}
  
Else if (nResponse = IDCANCEL)
  
{
  
// TODO: Place code here to handle when the dialog is
  
//Dismissed with Cancel
  
}
  
 
  
Return FALSE;
  
}
  

This is to generate a mode dialog box and create it.FALSE to exit directly. During the design, you can design the interface by editing the dialog box resources, and then process the customer's input through ClassWizard ing message. As the previous sections have already mentioned, this section will not be repeated.

Similarly, dialog box-based applications can also use the attribute dialog box as the field.

Related Article

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.