Click here to Skip to main content
15,567,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMaking a dialog box a child of a view Pin
Mike Hankey12-Jul-08 13:54
professionalMike Hankey12-Jul-08 13:54 
AnswerRe: Making a dialog box a child of a view Pin
David Crow12-Jul-08 14:37
David Crow12-Jul-08 14:37 
GeneralRe: Making a dialog box a child of a view Pin
Mike Hankey12-Jul-08 15:46
professionalMike Hankey12-Jul-08 15:46 
GeneralRe: Making a dialog box a child of a view Pin
bolivar12312-Jul-08 16:15
bolivar12312-Jul-08 16:15 
GeneralRe: Making a dialog box a child of a view Pin
Mike Hankey12-Jul-08 16:29
professionalMike Hankey12-Jul-08 16:29 
GeneralRe: Making a dialog box a child of a view Pin
bolivar12312-Jul-08 17:13
bolivar12312-Jul-08 17:13 
GeneralRe: Making a dialog box a child of a view Pin
Mike Hankey12-Jul-08 17:27
professionalMike Hankey12-Jul-08 17:27 
GeneralRe: Making a dialog box a child of a view Pin
bolivar12312-Jul-08 17:52
bolivar12312-Jul-08 17:52 
Come to think of it, creating the child dialog in the view constructor is not the right place. The view window has not been created yet.

Try creating the child dialog in the OnInitialUpdate handler for the view. Alternatively you can create your child dialog in the OnCreate handler (after you have called CView::OnCreate).

I just created a simple SDI app and tried creating a child dialog in the constructor and saw the same ASSERT you are getting. I then moved the child creation code into OnInitialUpdate and the child dialog was created successfully.
GeneralRe: Making a dialog box a child of a view Pin
Mike Hankey12-Jul-08 18:10
professionalMike Hankey12-Jul-08 18:10 
GeneralRe: Making a dialog box a child of a view Pin
David Crow12-Jul-08 17:42
David Crow12-Jul-08 17:42 
QuestionHow to tokenize a string Pin
Nandu_77b12-Jul-08 11:37
Nandu_77b12-Jul-08 11:37 
AnswerRe: How to tokenize a string Pin
Saurabh.Garg12-Jul-08 20:41
Saurabh.Garg12-Jul-08 20:41 
AnswerRe: How to tokenize a string Pin
Ștefan-Mihai MOGA12-Jul-08 21:44
professionalȘtefan-Mihai MOGA12-Jul-08 21:44 
Questionhow to find a word in a string from the end? Pin
Nandu_77b12-Jul-08 9:57
Nandu_77b12-Jul-08 9:57 
AnswerRe: how to find a word in a string from the end? Pin
Luc Pattyn12-Jul-08 10:06
sitebuilderLuc Pattyn12-Jul-08 10:06 
QuestionRe: how to find a word in a string from the end? Pin
Nandu_77b12-Jul-08 10:16
Nandu_77b12-Jul-08 10:16 
AnswerRe: how to find a word in a string from the end? Pin
Luc Pattyn12-Jul-08 10:27
sitebuilderLuc Pattyn12-Jul-08 10:27 
QuestionRe: how to find a word in a string from the end? Pin
Nandu_77b12-Jul-08 11:30
Nandu_77b12-Jul-08 11:30 
AnswerRe: how to find a word in a string from the end? Pin
Bram van Kampen12-Jul-08 14:41
Bram van Kampen12-Jul-08 14:41 
QuestionConverting CString to const char* [modified] -Solved again Pin
Marc Clifton12-Jul-08 7:02
mvaMarc Clifton12-Jul-08 7:02 
AnswerRe: Converting CString to const char* [modified] -Solved again Pin
Mark Salsbery12-Jul-08 9:11
Mark Salsbery12-Jul-08 9:11 
AnswerRe: Converting CString to const char* [modified] -Solved again Pin
Nandu_77b12-Jul-08 10:05
Nandu_77b12-Jul-08 10:05 
GeneralRe: Converting CString to const char* [modified] -Solved again Pin
Marc Clifton12-Jul-08 10:11
mvaMarc Clifton12-Jul-08 10:11 
QuestionWTF: Linker can only find inline functions [modified] - Solved Pin
Marc Clifton12-Jul-08 6:34
mvaMarc Clifton12-Jul-08 6:34 
AnswerRe: WTF: Linker can only find inline functions [modified] - Solved Pin
bob1697212-Jul-08 8:11
bob1697212-Jul-08 8:11 

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.