Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / modal dialog error Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
os3omaha

April 29, 2005, 11:11 AM

when i call DoModal() to display my dialog (MFC), it returns -1.

from the DoModal source, I can see that there was a "failiure to load the dialog template resource". I'm not sure exactly what i've messed up, any ideas?

 
Patrick Grawehr

April 29, 2005, 03:49 PM

It seems Windows cannot find the resource ID you specified. Maybe you mixed up Resource ID's and Resource string names?
If you post the code that you use to load and display the dialog, we could most probably give you more tips about what's going wrong here.

 
Endurion

April 29, 2005, 11:37 PM

Could also be that you're using common controls without calling InitCommonControls. Or ActiveX controls without having them properly registered. If one child of a dialog cannot be created usually the whole dialog will fail.

 
Reedbeta

April 30, 2005, 12:32 AM

You could try assigning the "no fail create" property in the resource editor. If the dialog box loads successfully with this flag, then the problem is as Endurion mentioned, in one of the controls.

 
This thread contains 4 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.