help making a message box popup
i am learning c++ and am working on an application that popups a messagebox when somebody presses ok or cancel
Code:
MessageBox(NULL,"God you idiot i told you not to open it","You idiot",MB_OKCANCEL);
do i need to add a
Code:
function::OnOK();
function::OnCANCEL();
because i think that is how the API does it?
I believe you need this ...
Okay. It's been a while since I've posted here. I have been really busy in high school, and I have a project I'm working on. :) I'm working on a 2D engine, using SDL, for a game my friends and I are going to make.
Anyhow, here's what I believe you need:
Code:
int nRet = MessageBox(NULL, "Message", "Title", MB_OKCANCEL);
if (nRet == MB_OK)
{
// Process "Ok" button
// ...
}
else if (nRet == MB_CANCEL)
{
// Process "Cancel" button
// ...
}
If you're wanting to know what the user chooses, that's they answer. :D