Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Modal dialog boxes

This topic is 5293 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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 here
Dlg.cLanguage.AddString("French");
if( IDCANCEL == Dlg.DoModal() )
//...

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!