Click here to Skip to main content
15,906,330 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with opening a file in editbox Pin
Deepak Samuel2-Nov-03 12:55
Deepak Samuel2-Nov-03 12:55 
GeneralExiting Dialog to calling Dialog with data Pin
Karen03022-Nov-03 12:02
Karen03022-Nov-03 12:02 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Christian Graus2-Nov-03 12:11
protectorChristian Graus2-Nov-03 12:11 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Karen03022-Nov-03 12:18
Karen03022-Nov-03 12:18 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Christian Graus2-Nov-03 12:20
protectorChristian Graus2-Nov-03 12:20 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Karen03022-Nov-03 12:41
Karen03022-Nov-03 12:41 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Christian Graus2-Nov-03 12:44
protectorChristian Graus2-Nov-03 12:44 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Karen03022-Nov-03 12:59
Karen03022-Nov-03 12:59 
Ths is the code I am using to call the 2nd dialog;

TimeGet TimeGetDlg;
TimeGetDlg.DoModal();
if(TimeGetDlg.DoModal() == IDOK ) {
TG_AlarmHH= TimeGetDlg.HH;
TG_AlarmMM= TimeGetDlg.MM;
TG_AlarmAMPM= TimeGetDlg.AMPM;
}
and in the 2nd dialog, this is the overriden OK code;

void TimeGet::OnBnClickedOk()
{
CWnd* pWnd;
pWnd=GetDlgItem(IDC_HH);
pWnd->GetWindowText(HH);
pWnd=GetDlgItem(IDC_MM);
pWnd->GetWindowText(MM);
CDialog::OnOK();
}

What is happening is that when OK is clicked the first time, control returns to the 1st dialog at the if statement. The if fails and the 2nd dialog pops up again. This time when OK is clicked, control again returns to the if statement in the first dialog but this time the if succeeds and everything proceeds normally.

I have to admit that at this point I am totally lost.

Karen
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Karen03022-Nov-03 13:02
Karen03022-Nov-03 13:02 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Christian Graus2-Nov-03 13:08
protectorChristian Graus2-Nov-03 13:08 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Karen03022-Nov-03 13:14
Karen03022-Nov-03 13:14 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Christian Graus2-Nov-03 13:15
protectorChristian Graus2-Nov-03 13:15 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Karen03023-Nov-03 2:05
Karen03023-Nov-03 2:05 
GeneralRe: Exiting Dialog to calling Dialog with data Pin
Christian Graus3-Nov-03 9:09
protectorChristian Graus3-Nov-03 9:09 
Questionhow to debug dll Pin
pnpfriend2-Nov-03 11:26
pnpfriend2-Nov-03 11:26 
AnswerRe: how to debug dll Pin
Brad Bruce2-Nov-03 12:35
Brad Bruce2-Nov-03 12:35 
GeneralMulti doc/views and MDI Pin
alex.barylski2-Nov-03 8:49
alex.barylski2-Nov-03 8:49 
GeneralRe: Multi doc/views and MDI Pin
Michael P Butler2-Nov-03 9:20
Michael P Butler2-Nov-03 9:20 
GeneralRe: Multi doc/views and MDI Pin
alex.barylski2-Nov-03 9:33
alex.barylski2-Nov-03 9:33 
GeneralC++ Pin
slgeorge52-Nov-03 7:39
slgeorge52-Nov-03 7:39 
GeneralRe: C++ Pin
Michael Dunn2-Nov-03 7:46
sitebuilderMichael Dunn2-Nov-03 7:46 
GeneralRe: C++ Pin
slgeorge52-Nov-03 7:48
slgeorge52-Nov-03 7:48 
GeneralRe: C++ Pin
David Crow3-Nov-03 5:35
David Crow3-Nov-03 5:35 
GeneralRe: C++ Pin
Phil Martin2-Nov-03 11:34
professionalPhil Martin2-Nov-03 11:34 
GeneralRe: C++ Pin
slgeorge52-Nov-03 12:13
slgeorge52-Nov-03 12:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.