#!PECMD
#code=936
SET  ::WM_MOUSEENTER                   =0x1000
SET  ::WM_WINDOWPOSCHANGING            =0x0046
SET  ::WM_WINDOWPOSCHANGED             =0x0047
SET  ::WM_SIZE                         =0x0005
ENVI &WID=0
ENVI &&WIN1ID=0
ENVI &&X1=NA
ENVI &&Y1=NA

_SUB OnPOS
    ENVI @@POS=?%&__WinID%:&X:&Y
    FIND $%&X1%:%&Y1%=%&X%:%&Y%, EXIT 
    TEAM ENVI &X1=%&X%| ENVI &Y1=%&Y%
    CALC &X=%&X% + 20
    CALC &Y=%&Y% + 50
    ENVI @@POS=%&WID%:%&X%:%&Y%
_END


_SUB WIN1,W300H250,ÐÂ´°¿Ú1,KILL \,,70
    ENVI &WIN1ID=%&__WinID%
    ITEM ITEM1,L133T2W60H20,ITEM1, MESS   WIN1/ITEM1
    //ENVI @this.MSG=#1::&wp,&lp, CALL OnPOS
    //ENVI @this.MSG=%&WM_WINDOWPOSCHANGED%::&wp,&lp, ENVI @this.POSTMSG=#1 //ÑÓÊ±
    ENVI @this.MSG=_%&WM_WINDOWPOSCHANGED%::&wp,&lp, CALL OnPOS
    ENVI @this.MSG=%&WM_SIZE%::&wp,&lp, CALL OnPOS
    CALL OnPOS
_END // 

_SUB WIN2,W227H145,,,,-40
    ENVI &WID=%&__WinID%
    LABE LABE6,L73T27W60H30,LABE6,,
_END // 



CALL @-WIN2
WIN1
KILL @@%WID%

