main
''
''    AUTHOR: Steve Bailey
''    CREATED: 12-8-96
''    DESCRIPTION:
''      This program shows some of the system message dialog boxes.
''      The message boxes are defined in SIMDRAW.  The message 'text'
''      can be set using the DARY.A attribute of the form.
''

    define MESSAGE.FORM as a pointer variable
    define FIELD.ID as a text variable
    define MESSAGE as a 1-dim text array

    reserve MESSAGE(*) as 2

    '' init and display a 'plain' style message
    let MESSAGE(1) = "Plain old message"
    let MESSAGE(2) = "(This is a 'plain' message)"
    show MESSAGE.FORM with "plain.frm"
    let DARY.A(MESSAGE.FORM) = MESSAGE(*)
    let FIELD.ID = ACCEPT.F(MESSAGE.FORM, 0)
    write FIELD.ID as "Button pressed was ", T *, /
    let MESSAGE.FORM = 0

    '' init and display a 'alert' style message
    let MESSAGE(1) = "Alert!!!  Alert!!!"
    let MESSAGE(2) = "(This is an 'alert' message)"
    show MESSAGE.FORM with "alert.frm"
    let DARY.A(MESSAGE.FORM) = MESSAGE(*)
    let FIELD.ID = ACCEPT.F(MESSAGE.FORM, 0)
    write FIELD.ID as "Button pressed was ", T *, /
    let FIELD.ID = ACCEPT.F(MESSAGE.FORM, 0)
    write FIELD.ID as "Button pressed was ", T *, /
    let MESSAGE.FORM = 0

    '' init and display a 'stop' style message
    let MESSAGE(1) = "Stop what your doing!"
    let MESSAGE(2) = "(This is a 'stop' message)"
    show MESSAGE.FORM with "stop.frm"
    let DARY.A(MESSAGE.FORM) = MESSAGE(*)
    let FIELD.ID = ACCEPT.F(MESSAGE.FORM, 0)
    write FIELD.ID as "Button pressed was ", T *, /
    let MESSAGE.FORM = 0

    '' init and display a 'stop' style message
    let MESSAGE(1) = "Do you really want to trash your system?"
    let MESSAGE(2) = "(This is a 'question' message)"
    show MESSAGE.FORM with "question.frm"
    let DARY.A(MESSAGE.FORM) = MESSAGE(*)
    let FIELD.ID = ACCEPT.F(MESSAGE.FORM, 0)
    write FIELD.ID as "Button pressed was ", T *, /
    let MESSAGE.FORM = 0

    '' init and display a 'information' style message
    '' NOTE: message text can also be set from within the editor
    show MESSAGE.FORM with "information.frm"
    let FIELD.ID = ACCEPT.F(MESSAGE.FORM, 0)
    write FIELD.ID as "Button pressed was ", T *, /
    let MESSAGE.FORM = 0

    let FIELD.ID = FIELD.ID                             '' prevent warnings
end
