Displays a warning message box, with up to three buttons.
The index of the button clicked by the user is returned.