苦肉の策です。(笑)
オーバーレイの機能を利用していますので、動画を2つオープンすると無効になります。
Vistaでは使えない気もします・・・
title "落書きw"
mref mr,67 //ウィンドウハンドル取得
onexit *e //終了時に移動
onclick gosub *omake
dialog "mpg;*.avi;*.wmv;*.asf;*.3gp;*.mp4;*.flv",16,"動画など"
//↑環境依存
if stat=0:end //未選択時に終了
x=0:y=0:ax=640:ay=480 //動画の左上座標、動画サイズ
fname=refstr //ファイル名を代入
//オーバーレイで再生
mci "open \""+fname+"\" alias f"
if stat=-1 : dialog "Open err":end //オープンエラー
mci "window f handle "+mr.13 //ウィンドウハンドルをMCIに送信
mci "put f destination at "+x+" "+y+" "+ax+" "+ay //ウィンドウに貼り付け
mci "play f"
// mci "stop f"
gsel 0,-1
screen 2,640,480 //2つ目のウィンドウ作成
title "落書きw 右クリックしてみそ"
color 16,0,16 //オーバーレイはこの色だと下が透ける
boxf //塗りつぶし
color 255,255,255 //これは落書き用
repeat
nx=ginfo_wx1:ny=ginfo_wy1 //ウィンドウの移動
line mousex, mousey //落書き
wait 1
if ginfo_wx1!=nx{ //移動を検出したらウィンドウ0と2を同期させる
if ginfo_wy1!=ny{
nx=ginfo_wx1:ny=ginfo_wy1 //座標再取得
gsel 0,0 //0をアクティブに
width 640,480,nx,ny //ID0をID2と同じ座標に
gsel 0,-1 //ID0を非アクティブ
gsel 2,0 //ID2をアクティブ
}
}
loop
*omake //「おまけ」右クリックで色を変更
if wparam=2{
dialog "",32,""
if stat=0{
color 255,255,255
}else{
color ginfo_r,ginfo_g,ginfo_b
}
}
return
//wait 1000
*e //コレを呼ばないと大変なことに・・・
mci "stop all" //MCIはALLで全部クリアできます。
mci "close all"
end