Jump to content
  • Advertisement

Archived

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

remi

Modal dialog boxes

This topic is 5385 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
Post some code if you can...much easier than trying to speculate on what is causing the problem.

Share this post


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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!