
ENVI &&WM_COMMAND=0x0111
ENVI &&EN_CHANGE=0x0300
_SUB WIN1,W354H309,
    ENVI &&i=0
    ENVI &&OldMsg=原始内容
    MEMO &Edit1,L10T10W275H70,%&OldMsg%,,
    MEMO &Edit2,L10T82W275H70,%&OldMsg%,,
    ENVI @this.MSG=%&WM_COMMAND%::&&wp,&&lp,  ENVI  @@SENDMSG=%&lp%:#1;%&wp%;%&__WinID%

    ENVI @&Edit1.MSG=COMMAND=#1##%&EN_CHANGE%::&&wp,&&lp, CALL OnEN_CHANGE  Edit1
    ENVI @&Edit2.MSG=COMMAND=#1##%&EN_CHANGE%::&&wp,&&lp, CALL OnEN_CHANGE  Edit2

    //ENVI @this.MSG=%&WM_COMMAND%::&&wp,&&lp,  ENVI  @@SENDMSG=%&WM_COMMAND%:#1;%&wp%;%&__WinID%
    //ENVI @&Edit1.MSG=COMMAND##%&EN_CHANGE%::&&wp,&&lp, CALL OnEN_CHANGE  Edit1
    //ENVI @&Edit2.MSG=COMMAND##%&EN_CHANGE%::&&wp,&&lp, CALL OnEN_CHANGE  Edit2

    //ENVI @&Edit1.MSG=#1::&&wp,&&lp, CALL OnCommand  Edit1  //OK
    //ENVI @&Edit2.MSG=#1::&&wp,&&lp, CALL OnCommand  Edit2

    LABE &提示,L28T204W263H30,,,
_END
WIN1

_SUB OnCommand 
    CALC -base=16 #&&wCode=%&wp% / 0x10000 //高16位,操作码
    IFEX $%&EN_CHANGE% = %&wCode% ,!  EXIT  //不是改变
    //内容改变，响应  
    // 不要用 MESS 
    CALC #&i= %&i% + 1
    ENVI @&提示=%* 内容改变了    %&i% 
    //ENVI @&Edit1=%&OldMsg%  //恢复旧内容，阻止改变
_END

_SUB OnEN_CHANGE 
    CALC #&i= %&i% + 1
    ENVI @&提示=%* 内容改变了    %&i% 
    //ENVI @&Edit1=%&OldMsg%  //恢复旧内容，阻止改变
_END

