?
Solved

How do I....

Posted on 2000-03-14
1
Medium Priority
?
178 Views
Last Modified: 2013-11-20
I have a dialog box (DialogB) that prompts the users for some information that needs to be processed by the dialog box (DialogA) that opened it.  Now box dialog boxes are Modal, how can I get the info from DialogB into a var from DialogA??
0
Comment
Question by:meetze
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
pagladasu earned 400 total points
ID: 2617736
Suppose DialogB has an edit control for taking in username. Assume that its id is IDC_EDITUSERNAME. Use classwizard to associate a member variable with it. Say it is called m_username.
Override the OnOK member function of this dialog class as follows:
UpdateData(TRUE);
CDialog::OnOK();
Open the DialogB from a funtion of DialogA as follows:
    CDialogB mldg;
    CString username;
    int response=mdlg.DoModal();
    if(response==IDOK){
       username=mdlg.m_username;
    }

Thats about all. Hope this helps.
pagladasu
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question