我用<br> keybd_event(VK_BACK, 0, 0, 0);<br> keybd_event(VK_BACK, 0, KEYEVENTF_KEYUP, 0); <br>有效<br>可是用<br> SendMessage(handle, wm_keydown, VK_BACK,1);<br> SendMessage(handle, wm_keyup, VK_BACK,1);<br>没反映是什么原因<br>我想用SendMessage因为它是立即执行,因为我后面还有一句<br> SendMessage(handle, wm_paste, 0,0);<br>这样先执行模拟按键删除再执行粘贴.<br>如果用<br> keybd_event(VK_BACK, 0, 0, 0);<br> keybd_event(VK_BACK, 0, KEYEVENTF_KEYUP, 0); <br> SendMessage(handle, wm_paste, 0,0);<br>结果会先执行paste再执行执行模拟按键删除,因为keybd_event是发到消息队列中,比<br>SendMessage(handle, wm_paste, 0,0)反而慢.