-
Determine MessageBox
Code:
MessageBox("Delete all?", "Warning",
MB_ICONWARNING | MB_DEFBUTTON2 | MB_OKCANCEL);
I would like to know the best way to determine what button was pushed. Then execute code based on the outcome. After searching, I found the return value IDOK and IDCANCEL for the above prompt. Any ideas on how to implement? Thanks
James
-
int Return = MessageBox("Delete all?", "Warning", MB_ICONWARNING | MB_DEFBUTTON2 | MB_OKCANCEL);
Code:
if(Return == IDOK) {
//execute code
}
else {
//execute code
}
-
KurtSurge, Thankyou much!