-- messagebox2.exw by Ad Rienks

include msgbox.e

integer result
sequence text

result = message_box("Got the message?", "messagebox2 demo",
                     {MB_YESNO, MB_ICONQUESTION})

if result = IDYES then
-- ^^ an if statement tests an expression to see if it is 0 (false) or
-- non-zero (true) and then executes the appropriate series of statements.

    text = "You got the message!"
elsif result = IDNO then
    text = "Haven't you got the message?"
else
    -- this should never happen
    text = "What have you been doing?"
end if

result = message_box(text, "Message Confirmation", MB_ICONINFORMATION)

-- end of messagebox2.exw
