Modal dialog boxes

Started by
2 comments, last by remi 20 years, 4 months ago
Hi all, i have a question concerning MFC. I built a dialog box with the VC''s resource editor. The dialog box has a CComboBox and i''ve already filled the data in but when call the DoModal() function nothing appears in the combo box. The worst thing is when i attempt to fill it(the combo box)dynamically, the program just crashes. PLZ help!
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"
Advertisement
Post some code if you can...much easier than trying to speculate on what is causing the problem.
Here are some codes
//...CRoomProp Dlg;//here we create a dialog box//cLanguage is a CComboBox control, member of CRoomProp.Dlg.cLanguage.AddString("English");//the program crashes hereDlg.cLanguage.AddString("French");if( IDCANCEL == Dlg.DoModal() )//...
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"
I figured out that the initialization of the item on the dialog box should be put within the function CDialog::OnInitialize(...)

thanx anyway!

[edited by - remi on November 23, 2003 10:11:56 AM]
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"

This topic is closed to new replies.

Advertisement