I am working in a project where in a dialog is called from a cs project.
This dialog is in dll (vc project).the dialog's handle is null, due to this i am unable to launch the dialog.

Code:
      AFX_MANAGE_STATE(AfxGetStaticModuleState())
      CFDialog dlg;
      int responce = dlg.DoModal();
the dlg handle is NULL(i debugged the Application and found) and the application crashes;

where am i going wrong ?