SET ::WM_RBUTTONDOWN=0x0204
SET ::WM_CUT =0x0300   //剪切
SET ::WM_COPY =0x0301  //拷贝
SET ::WM_PASTE =0x0302  //粘贴
SET ::WM_CLEAR =0x0303  //清除
SET ::WM_UNDO =0x0304   //撤销

_SUB WIN1,L30T30W680H600,新窗口1,
     MEMO* -rich &MEMO2,L10T10W675H501,123456789\n,,0x20,0xFFFFFF#0x008000,12:宋体
     ENVI @&MEMO2.MSG=_%WM_RBUTTONDOWN%:CALL @--popmenu MyMenu
_END
_SUB MyMenu
     MENU &Menu1,复制, ENVI  @&MEMO2.SENDMSG=%&WM_COPY%  // SEND #0x11_ #0x43_ #0x43^ #0x11^  ////CALL OnCOPY  //拷贝
//     MENU -
     MENU &Menu2,粘贴, ENVI  @&MEMO2.SENDMSG=%&WM_PASTE%  // SEND VK_CONTROL_;VK_V_;VK_V^;VK_CONTROL^  ///CALL OnPAS   //粘贴
     MENU &Menu3,剪切, ENVI  @&MEMO2.SENDMSG=%&WM_CUT%  
     MENU &Menu4,清除, ENVI  @&MEMO2.SENDMSG=%&WM_CLEAR%  
     MENU &Menu5,撤销, ENVI  @&MEMO2.SENDMSG=%&WM_UNDO%  
_END

_SUB OnCOPY 
    SEND #0x11_ #0x43_ #0x43^ #0x11^  //Ctrl-C 或
//    SEND VK_CONTROL_ VK_C_ VK_C^ VK_CONTROL^  //Ctrl-C  ,这种形式看着清楚    
_END

_SUB OnPAS
//    SEND #0x11_,#0x56_,#0x56^,#0x11^  //Ctrl-V 或
    SEND VK_CONTROL_ VK_V_ VK_V^ VK_CONTROL^  //Ctrl-V  ,这种形式看着清楚
_END

 win1