#module
#deffunc bsel int id
mref bmscr, id + 96
return
#defcfunc cbgetid
if bmscr = 0 : return : else : return bmscr.79
#defcfunc cbgetpos int direction, int state, local i
if bmscr = 0 : return
i = limit(state, 0, 2) + 80
if direction : return bmscr.i >> 16 : else : return bmscr.i & 0xFFFF
#global
size = 320, 80
help = "ノーマル", "ボタン押下", "マウスオーバー"
buffer 1
font msmincho, 12
repeat 3
color (cnt = 0) * 100 + 155, (cnt = 1) * 100 + 155, (cnt = 2) * 100 + 155
boxf , cnt * size.1, size.0, (cnt + 1) * size.1
color (cnt = 0) * -200 + 255, (cnt = 1) * -200 + 255, (cnt = 2) * -200 + 255
pos 10, (cnt + 1) * size.1 - 20 : mes help.cnt
loop
gsel 0
font msgothic, 25, 1
objsize size.0, size.1
objmode 2
objimage 1, , size.1 * 0, , size.1 * 1, , size.1 * 2
pos 50, 50 : button gosub "情 報 表 示", *info
bsel 0 // ウィンドウID0のカスタムボタン情報を取得
stop
*info
sdim s, 128
repeat 3
s += "\n" + help.cnt + "時の座標" + strf("(%d, %d)", cbgetpos(0, cnt), cbgetpos(1, cnt))
loop
dialog "使用ウィンドウID:" + cbgetid() + s
return
|