· Now we can make use of our Dlg class by creating a new object of that class and
displaying it on the screen with the DoModal() method, which returns an integer value.
[NB: If you add a Show Dialog item to the Program’s file menu and connect that menu
choice to the view class’s method OnFileShowdialog() you can add these same lines of
code to this method to enable the user to show the dialog box again after it is closed.]
Use the ClassWizard to add the OnInitialUpdate method. [Make sure
CcomputerConversationView is the class selected and doubleclick OnInitialUpdate in the
messages box]
void CComputerConversationView::OnInitialUpdate()
{
CView::OnInitialUpdate();
Dlg dlg;
int display = dlg.DoModal();
// TODO: add construction code here
}
No comments:
Post a Comment