开发者

How to create domodal dialog box in mfc dynamically?

开发者 https://www.devze.com 2023-02-18 03:35 出处:网络
i have created two dailog box statically. CParentDailog CMyDailog and then CParentDailog { CMyDailog *l_pdailog;

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

精彩评论

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