0
votes

I am currently working on a MFC GUI application, which does data manipulation based on user input. Now I would want to add a special feature so that only authorize user can able to write the data.

so as soon as a user click on Write button (void CMFC::OnWrite()), I wanted to open a new dialog box, which should ask for a password. the problem is I created a new Dialog box and on this even I called it with :

CPassWdDlg PassDlg;

if( PassDlg.DoModal() == IDOK )
{
    AfxMessageBox("File Read Successfully");
}
else
    return;

But, it just display the dialog box, and stuck there. In DoModel() call, I couldnt understand the reason of it.

Please let me know how to get away with it.

1
Are you calling EndDialog in your dialog?detunized

1 Answers

0
votes

I think I found the reason, in the property page, I had disabled the dialog box, which is making it to not respond.