#module
#deffunc geteditmodify int
mref id, 0
mref stt, 64
objsend id, 0x00B8, 0, nonuse // 変更状態を取得
return stat
#deffunc seteditmodify int, int
mref id, 0 : mref state, 1
objsend id, 0x00B9, state, nonuse // 状態を変更
return
#global
onexit *exit
sdim buf, 128
objsize winx, 25
button "保存", *save
mesbox buf, , winy - 25, 5
stop
*save
dialog "保存しました…と言ってもココでは変更状態をクリアするだけです。"
seteditmodify 1, 0 // 未変更状態にする
stop
*exit
// 終了前に変更されているかを確認する
geteditmodify 1
if stat {
dialog "終了前に保存しますか?", 2
if stat = 6 : goto *save
}
end
|