How to create domodal dialog box in mfc dynamically?
i have created two dailog box statically.
CParentDailog
CMyDailog
and then
CParentDailog
{
CMyDailog *l_pdailog;
}
in oninitdailog of CParen开发者_JAVA技巧tDailog ia mdoing
l_pdailog = new CMyDailog();
l_pdailog ->create(ID_DAILG1); // this is id of CMyDailog
l_pdailog ->Domodal(); // crashing at this point
why it is crashing?
Hi you need to set parent window:
l_pdailog = new CMyDailog(pWndparent);
l_pdailog ->Domodal();
精彩评论