如何在richedit1中加入右键菜单
1个回答
推荐于2016-07-04
展开全部
建立一个RICHEDIT,建一个POPUPMEMO1,里面放两个菜单COPY和PASTE
将RICHEDIT的POPUPMEMO设为POPUPMEMO1
COPY里程序:
keybd_event(VK_LCONTROL ,0,0,0);
keybd_event($43,0,0,0);
keybd_event(VK_LCONTROL,0,KEYEVENTF_KEYUP,0);
keybd_event($43,0,KEYEVENTF_KEYUP,0);
PASTE里程序:
keybd_event(VK_LCONTROL ,0,0,0);
keybd_event($56,0,0,0);
keybd_event(VK_LCONTROL,0,KEYEVENTF_KEYUP,0);
keybd_event($56,0,KEYEVENTF_KEYUP,0);
运行,在RICHEDIT里输入段文字,用鼠标选一段字,点右键出现菜单,点COPY则复制,点PASTE则粘贴.
将RICHEDIT的POPUPMEMO设为POPUPMEMO1
COPY里程序:
keybd_event(VK_LCONTROL ,0,0,0);
keybd_event($43,0,0,0);
keybd_event(VK_LCONTROL,0,KEYEVENTF_KEYUP,0);
keybd_event($43,0,KEYEVENTF_KEYUP,0);
PASTE里程序:
keybd_event(VK_LCONTROL ,0,0,0);
keybd_event($56,0,0,0);
keybd_event(VK_LCONTROL,0,KEYEVENTF_KEYUP,0);
keybd_event($56,0,KEYEVENTF_KEYUP,0);
运行,在RICHEDIT里输入段文字,用鼠标选一段字,点右键出现菜单,点COPY则复制,点PASTE则粘贴.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询