The valid values for the style are:

  • mbOK
  • mbOKCANCEL
  • mbABORTRETRYIGNORE
  • mbYESNOCANCEL
  • mbRETRYCANCEL
  • mbICONHAND
  • mbICONQUESTION
  • mbICONEXCLAMATION
  • mbICONASTERISK
  • mbDEFBUTTON1
  • mbDEFBUTTON2
  • mbDEFBUTTON3
  • mbDEFBUTTON4

The MessageBox function return value corresponds to the button which the user pressed:

  • mrOK
  • mrCANCEL
  • mrABORT
  • mrRETRY
  • mrIGNORE
  • mrYES
  • mrNO
  • mrCLOSE
  • mrHELP

Example

if (MessageBox("Do you want to cancel the build", "Cancel Build", mbOKCANCEL) === mrOK){
   // build needs to stop
}
  • No labels