开发者

Adding multiple Dialog box to VC++ MFC application

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 coul开发者_如何学运维dnt understand the reason of it.

Please let me know how to get away with it.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜