tags:

views:

28

answers:

1

I did the following steps to use the CDialog in win 32 application:

  1. Changed the use of MFC to "use mfc shared DLL".
  2. Added a dialog resource and added a class for the dialog.
  3. Included the dialog class in my main.
  4. Tried to call do modal.

when i try to call do modal...i am getting an debug assertion failed.. can anybody help me out of this?

A: 

"Shared DLL" does matter only when you distribute your application. With that option
the executable does not contain MFC core libs so you'll have to provide them with the exe.

Now, if the wizard generated the dialog class, this is the standard way to call it:

#include "MyDlg.h"
...
void DisplayMyDialog() {
   CMyDlg  dlg;
   dlg.DoModal();
}
Nick D
no it didnt work...
kiddo
@kiddo, are you sure the assertion is related to the dialog? You should provide more info. Post the assertion message.
Nick D