メニューってこんな感じのですか?。
#include "mod_menu.as"
#enum global NULL=0
#enum CMD_OPEN
#enum CMD_SAVE
#enum CMD_SINKI
#enum CMD_BARJON
oncmd gosub *OnCommand, WM_COMMAND
onexit gosub *OnExitMess
newmenu hfilemenu,1
addmenu hfilemenu, "新規作成(&N)", CMD_SINKI
addmenu hfilemenu, "開く(&O)", CMD_OPEN
addmenu hfilemenu, "上書き保存(&S)", CMD_SAVE
addmenu hfilemenu, "", NULL, 0x800
addmenu hfilemenu, "メモ帳の終了(&X)", CMD_QUIT
newmenu hhelpmenu,1
addmenu hhelpmenu, "バージョン情報(&A)", CMD_BARJON
newmenu hmenu,0
addmenu hmenu, "ファイル(&F)", hfilemenu, 0x10
addmenu hmenu, "ヘルプ(&H)", hhelpmenu, 0x10
applymenu hmenu
*note
title "無題-メモ帳"
sdim buf,65000
buf=""
cls 1
clrobj
objmode 1
mesbox buf,640,460,1
stop
*OnCommand
switch (wparam & 0xFFFF)
case CMD_OPEN
goto *file_load
swbreak
case CMD_SAVE
goto *file_save
swbreak
case CMD_QUIT
PostMessage hwnd, WM_CLOSE, 0, 0
swbreak
case CMD_BARJON
dialog "メモ帳",0,"バージョン情報"
swbreak
case CMD_SINKI
goto *note
swbreak
swend
return
*OnExitMess
dialog "終了しますか?",2,"確認"
if stat = 6 {
end
}
return
*file_save
dialog "txt",17,"テキストファイル"
if stat=0 : goto *dlcan
fname = refstr
exname=getpath(fname,2)
if exname="" : fname+=".txt"
notesel buf
notesave fname
name=refstr
name=getpath(name,8)
title name+"-メモ帳"
*dlcan
stop
*file_load
dialog "txt;*.hsp",16,"テキストファイル"
if stat=0 : goto *dlcan2
notesel buf
noteload refstr
objprm 0,buf
name=refstr
name=getpath(name,8)
title name+"-メモ帳"
*dlcan2
stop