I had a "modal" Dialog Box that I displayed it like:
and the dialog works perfectly.
But Now I want to change from "Modal" to "Modeless" then I did for displaying:
CDialogDlg * dialog;
dialog = new CDialogDlg();
if(dialog != NULL)
BOOL ret = dialog->Create(IDD_DIALOG1,this);
if(!ret) //Create failed.
AfxMessageBox("Error creating Dialog");
AfxMessageBox("Error Creating Dialog Object"); }
Then the dialog is created perfectly but when I press one button of this dialog that calls to the "CDC:MoveTo" function appears one assert error. To debug it, the error appear in the line:
VERIFY(::MoveToEx(m_hAttribDC, x, y, &point));
of CDC:MoveTo definition.
The question is: Why when the Dialog is Modal everything working perfectly, but when the dialog os Modeless appears this error?
Thanks in advance.