More details

Hello,
Could somebody help me how in a message box to make a button do functions?
You mean the MessageBox function? It returns the id of the button you click. IDOK, IDCANCEL, IDYES, IDNO, IDABORT, etc.
1
2
3
4
5
int buttonClicked=::MessageBox(parentWindowOrNULL, "test", "test", MB_OK);
if(buttonClicked==IDOK)
{
  ::MessageBox(parentWindowOrNULL, "ok", "ok", MB_OK);
}
Thank you Raduv and Homberto, know now and have tested and it works.

But it works when I replace "parentWindowOrNULL" into "NULL". So I don't how could I able to use "parentWindowOrNULL".
"parentWindowOrNULL" means either the HWND of the parent window (most likely the main window or another significant one) or NULL
I see,
Thanks
Topic archived. No new replies allowed.