/' Iup Alarm: Example in C 
   Shows a dialog similar to the one shown when you exit a program without saving.
'/

#include once "crt/stdlib.bi"
#include once "crt/stdio.bi"
#include once "inc/iup.bi"

sub _init_ constructor
  IupOpen(0,0)
end sub

sub _exit_ destructor
  IupClose()
end sub

'
' main
'
' Executes IupAlarm 
dim as integer answer = IupAlarm ("IupAlarm Example", "File not saved! Save it now?", "Yes", "No", "Cancel")
 ' shows a message for each selected button 
select case answer
case 1 : IupMessage ("Save file", "File saved successfully - leaving program")
case 2 : IupMessage ("Save file", "File not saved - leaving program anyway")
case 3 : IupMessage ("Save file", "Operation canceled")
end select


