请教各位大牛:
使用sendmessage(hwnd,WM_PASTE,0,0)发送粘贴消息时;是否能确定粘贴位置,如何确定?

解决方案 »

  1.   

    你可以模拟发送Ctrl+V,想要对指定的窗口来粘贴,你需要先将该窗口SetForroundWnd,模拟点击获取焦点,然后再Ctrl+V
      

  2.   

    谢谢Eleven回复。通过sendmessage发送WM_PASTE消息,每次只是粘贴在(0,0)位置。加入我想粘贴在(0,100)处,就不知怎样做了,请指教。
      

  3.   

    WM_PASTE
    An application sends a WM_PASTE message to an edit control or combo box to copy the current content of the clipboard to the edit control at the current caret position. Data is inserted only if the clipboard contains data in CF_TEXT format.