I have a dialog class defined as

class MyDialogublic CDialogEx
{};

and I'd like to call up the dialog after a right mouse click on the view of a SDI application

The menu is shown after the right mouse click but there is no dialog displayed after I select its item "call dialog".

void MyApplicatioView::OnDisplayDlg()
{
MyDialog d;
INT i=d.DoModal();
}

'i' always gets the value of -1.

Would you helo me please ?
Thank you