How to display dialogboxparam dialog through the Messagebox ButtonClick?

岁酱吖の 提交于 2019-12-12 01:16:35

问题


i have using C++ win32 API.

i already craeate a dialogbox within a dialogbox using dailogboxparam function in bb class...

INT_PTR bb::DialogProc(UINT msg, WPARAM wp, LPARAM lp)
 {
//some case and...

case IDC_OK:
DialogBoxParam(hInst,MAKEINTRESOURCE(IDD_DIALOG),_hwnd,myfunctionDlgProc,lp);
break;
}

int CALLBACK bb::myfunctionDlgProc(HWND hDlg,UINT msg,WPARAM  wp, LPARAM lParam)
{

//some code...
}

when i press the OK button in dialogbox...it shows myfunctionDlgProc Dialogbox...

Now,i want the same thing in my other aa class,now i am using messagebox..it have 2 buttons OK and Cancel...

if when i press messagebox ok button,i want to show the myfunctionDlgProc Dialogbox...

    int retun;

        retun = MessageBox(hDlg,(LPCWSTR)"",TEXT("Logon Message"), MB_OKCANCEL| MB_ICONWARNING);

        if(retun=1)
       {
DialogBoxParam(hInst,MAKEINTRESOURCE(IDD_DIALOG),_hwnd,myfunctionDlgProc ,lp);
        }

i try it...but how to i pass the lp value in this code...

DialogBoxParam(hInst,MAKEINTRESOURCE(IDD_DIALOG),_hwnd,myfunctionDlgProc,lp);

Did u get my issue?

How can i achieve this?

来源:https://stackoverflow.com/questions/13171488/how-to-display-dialogboxparam-dialog-through-the-messagebox-buttonclick

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!