'For use in GFA Basic programs


Alert and Message are used where there is a program branch

that requires user input.


Alerts and Alert boxes are backward compatable to Gfa basic

Atari programs before Windows. The difference is that with Alert

and AlertBox() and the Windows Message() and MessageBox

is that the programmer can add several custom buttons for the

user input using Alert.


Click here to download GB32_AlertMessage.zip


example:


'The buttons are defineable with the Alert Command

'and they are not defineable using the Message Command


'Note MB_APPLMODAL appears to have no effect in GB32 message Style masking

'mStyle = MB_OK | MB_ICONSTOP

'has the same effect as MB_APPLMODAL | MB_OK | MB_ICONSTOP


Global mStyle As Int

Global mMsg As String

Global mTitle As String

Global mFlag As Word


'mStyle = MB_YESNO | MB_ICONQUESTION

'MsgBox mFlag

'If mFlag = 6'Yes

'EndIf

'If mFlag = 7'No

'EndIf


Alert 1, "message", 1, "OK", mFlag 'MB_ICONSTOP

Alert 2, "message", 1, "OK", mFlag 'MB_ICONQUESTION

Alert 3, "message", 1, "OK", mFlag 'MB_ICONEXCLAMATION

Alert 4, "message", 1, "OK", mFlag 'MB_ICONINFORMATION

Alert 1, "message", 1, "YES|NO", mFlag 'MB_ICONSTOP

Alert 2, "message", 1, "YES|NO", mFlag 'MB_ICONQUESTION

Alert 3, "message", 1, "YES|NO", mFlag 'MB_ICONEXCLAMATION

Alert 4, "message", 1, "YES|NO", mFlag 'MB_ICONINFORMATION


'mStyle = MB_OK | MB_ICONSTOP

mStyle = 16

mMsg = "message"

mTitle = "title"

mFlag = Message(mMsg, mTitle, mStyle)


'mStyle = MB_OK | MB_ICONQUESTION

mStyle = 32

mMsg = "message"

mTitle = "title"

mFlag = Message(mMsg, mTitle, mStyle)


'mStyle = MB_OK | MB_ICONEXCLAMATION

mStyle = 48

mMsg = "message"

mTitle = "title"

mFlag = Message(mMsg, mTitle, mStyle)


'mStyle = MB_OK | MB_ICONINFORMATION

mStyle = 64

mMsg = "message"

mTitle = "title"

mFlag = Message(mMsg, mTitle, mStyle)


'mStyle = MB_YESNO | MB_ICONSTOP

mStyle = 20

mMsg = "Hey Gfa."

mTitle = "Not Finished"

mFlag = Message(mMsg, mTitle, mStyle)


'mStyle = MB_YESNO | MB_ICONQUESTION

mStyle = 36

mMsg = "Hey Gfa."

mTitle = "Not Finished"

mFlag = Message(mMsg, mTitle, mStyle)


'mStyle = MB_YESNO | MB_ICONEXCLAMATION

mStyle = 52

mMsg = "Hey Gfa."

mTitle = "Not Finished"

mFlag = Message(mMsg, mTitle, mStyle)


'mStyle = MB_YESNO | MB_ICONINFORMATION

mStyle = 68

mMsg = "Hey Gfa."

mTitle = "Not Finished"

mFlag = Message(mMsg, mTitle, mStyle)


'MB_ICONASTERISK obsolete the box contains a question mark icon.

'MB_ICONQUESTION the box contains a question mark icon.

'MB_ICONEXCLAMATION the box contains an exclamation mark icon.

'MB_ICONINFORMATION the box contains an icon with an "i" in a circle.

'MB_ICONHAND obsolete the box contains a stop sign icon.

'MB_ICONSTOP the box contains a stop sign icon.

'MB_OK the message box contains an "OK" push button.

'MB_ABORTRETRYIGNORE message box with three buttons Cancel, Retry, Ignore

'MB_APPLMODAL n/a the user must respond to a message before being able to continue working in the window which created the message.

'MB_DEFBUTTON1 the first button is selected (default).

'MB_DEFBUTTON2 the second button is selected.

'MB_DEFBUTTON3 the third button is selected.

'MB_ICONSTOP the box contains a stop sign icon.

'MB_OK the message box contains an "OK" push button.

'MB_OKCANCEL the message box contains two push buttons, "OK" and "Cancel".

'MB_RETRYCANCEL the message box contains two push buttons "Retry" and "Cancel".

'MB_SYSTEMMODAL used to indicate a serious error in the program (for example "out of memory"). As a rule the program must subsequently be terminated.

'MB_TASKMODAL same as MF_APPLMODAL. In addition all Top Level windows which belong to the current program are inactivated.

'MB_YESNO the message box contains two push buttons "Yes" and "No".

'MB_YESNOCANCEL the message box contains three push buttons "Yes", "No" and "Cancel".