TEAM ENVI^ ENVIMODE=1| ENVI^ FORCELOCAL=1
//SET ::BM_GETSTATE=0x00F2  //获取
SET ::BM_SETSTATE=0x00F3  //设定

SET ::BST_UNCHECKED=0x0000  //按钮弹起状态。
SET ::BST_CHECKED=0x0001    //按钮凹下去效果。
SET  ::WM_LBUTTONDOWN=0x0201
SET  ::WM_LBUTTONUP=0x0202
SET  ::WM_RBUTTONDOWN=0x0204


WIN1
_SUB WIN1,W289H249,按下不起的按钮,
    ITEM ITEM2,L45T105W60H30,按下, CALL Bt1Down
    ITEM ITEM3,L158T107W60H30,弹起,CALL Bt1Up
    ITEM ITEM1,L78T41W60H30,ITEM1,    CALL OnBt1       //左键按下 
    ENVI @ITEM1.MSG=%&::WM_RBUTTONDOWN%:  CALL Bt1Up   //右键弹起 
    ENVI @this.MSG=%&::WM_RBUTTONDOWN%:  CALL Bt1Up  
_END

_SUB OnBt1
    CALL Bt1Down
    // CALL @--popmenu       MyMenu1
_END

_SUB Bt1Down
    ENVI @ITEM1.SENDMSG=%&::BM_SETSTATE%;%&::BST_CHECKED%,       //设置按钮凹下去效果。
_END

_SUB Bt1Up
    ENVI @ITEM1.SENDMSG=%&::BM_SETSTATE%;%&::BST_UNCHECKED%,     //设置按钮凹下去效果。
_END

