おぉ!できました。ありがとうございます。
#uselib "user32.dll"
#func SetParent "SetParent" int,int
#func ShowWindow "ShowWindow" int,int
#module
#func SetWindowLong "SetWindowLongA" int,int,int
#cfunc GetWindowLong "GetWindowLongA" int, int
#deffunc AddWindowLong int hwnd_,int mode,int add,int sub
SetWindowLong hwnd_,mode,add|(GetWindowLong (hwnd_, mode)^( GetWindowLong (hwnd_, mode)&sub))
return
#global
#define WS_POPUP $80000000
#define WS_CHILD $40000000
#define WM_ACTIVATE $6
gsel 0,1
hwnd_=hwnd
screen 3,,,2
oncmd gosub *l,WM_ACTIVATE
AddWindowLong hwnd,-16,WS_CHILD,WS_POPUP
SetParent hwnd,hwnd_
ShowWindow hwnd,8
wait
gsel 0,1
stop
*l
if wparam=1{
mes "マウスクリック以外の方法でアクティブになろうとしているよ!"
mes strf("%08X",wparam)+"←┘"
}
return
ご指摘の通りでした。
As様 pizza様ありがとうございました。今後ともよろしくお願いいたします。