开发者

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();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜