Click here to Skip to main content
15,910,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem Using CString Pin
David Crow16-Nov-06 2:46
David Crow16-Nov-06 2:46 
AnswerRe: Problem Using CString Pin
David Crow15-Nov-06 6:57
David Crow15-Nov-06 6:57 
AnswerRe: Problem Using CString Pin
Maximilien15-Nov-06 8:21
Maximilien15-Nov-06 8:21 
AnswerRe: Problem Using CString Pin
George L. Jackson15-Nov-06 10:53
George L. Jackson15-Nov-06 10:53 
AnswerRe: Problem Using CString Pin
CoffeeAddict1915-Nov-06 17:31
CoffeeAddict1915-Nov-06 17:31 
AnswerRe: Problem Using CString Pin
Hamid_RT15-Nov-06 18:41
Hamid_RT15-Nov-06 18:41 
QuestionVC++ MFC multi dialog application - crash Pin
sdt2415-Nov-06 6:11
sdt2415-Nov-06 6:11 
AnswerRe: VC++ MFC multi dialog application - crash Pin
Roger Stoltz15-Nov-06 6:30
Roger Stoltz15-Nov-06 6:30 
CDialog::DoModal() will not return until the dialog is dismissed, hence it's called modal.
So you have a dialog calling another dialogs DoModal that calls the first dialog's DoModal that calls the second dialog's DoModal().... you get the picture, right?
It's not even the same dialog you call the second time since you create a new instance on the stack, it's just the same class.
Eventually you will run out of stack space and the application will crash or worse.
What you need to do is either post messages to the container of the dialogs that calls DoModal for each dialog when handled, or create modeless dialogs so that your CDialog::OnCancel() call will be executed and the dialog can be dismissed.

--
Roger


"It's supposed to be hard, otherwise anybody could do it!" - selfquote

"No one remembers a coward!" - Jan Elfström 1998
"...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above

QuestionRe: VC++ MFC multi dialog application - crash Pin
David Crow15-Nov-06 6:59
David Crow15-Nov-06 6:59 
AnswerRe: VC++ MFC multi dialog application - crash Pin
Raj Prathap15-Nov-06 18:57
Raj Prathap15-Nov-06 18:57 
GeneralRe: VC++ MFC multi dialog application - crash Pin
David Crow16-Nov-06 2:43
David Crow16-Nov-06 2:43 
GeneralRe: VC++ MFC multi dialog application - crash Pin
sdt2416-Nov-06 5:39
sdt2416-Nov-06 5:39 
QuestionRe: VC++ MFC multi dialog application - crash Pin
David Crow16-Nov-06 6:45
David Crow16-Nov-06 6:45 
AnswerRe: VC++ MFC multi dialog application - crash Pin
sdt2420-Nov-06 2:14
sdt2420-Nov-06 2:14 
QuestionodbcDataReader error Pin
priyank_ldce15-Nov-06 6:10
priyank_ldce15-Nov-06 6:10 
AnswerRe: odbcDataReader error Pin
Mark Salsbery15-Nov-06 6:56
Mark Salsbery15-Nov-06 6:56 
QuestionExcel Automation Using C++ #import Pin
Doug Knudson15-Nov-06 5:15
Doug Knudson15-Nov-06 5:15 
AnswerRe: Excel Automation Using C++ #import Pin
Roger Stoltz15-Nov-06 5:47
Roger Stoltz15-Nov-06 5:47 
GeneralRe: Excel Automation Using C++ #import Pin
Doug Knudson15-Nov-06 6:39
Doug Knudson15-Nov-06 6:39 
GeneralRe: Excel Automation Using C++ #import Pin
Roger Stoltz15-Nov-06 6:57
Roger Stoltz15-Nov-06 6:57 
QuestionHow can we get size of the File.... Pin
Anamika200515-Nov-06 5:05
Anamika200515-Nov-06 5:05 
AnswerRe: How can we get size of the File.... Pin
VonHagNDaz15-Nov-06 6:22
VonHagNDaz15-Nov-06 6:22 
GeneralRe: How can we get size of the File.... Pin
Anamika200515-Nov-06 19:51
Anamika200515-Nov-06 19:51 
GeneralRe: How can we get size of the File.... Pin
Anamika200515-Nov-06 19:52
Anamika200515-Nov-06 19:52 
Questionarray of pointers Pin
thathvamsi15-Nov-06 4:46
thathvamsi15-Nov-06 4:46 

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.