sparklin
asked on
Pasting to any open window.
I have the iHwnd of a window and I need to copy the current contents of the clipboard into this window. I have the following code but am unsure as to how to invoke a windows paste type command.
begin
SetForeGroundWindow(iHwnd) ;
try
ClipBoard.Open;
Handle := Clipboard.GetAsHandle(CF_T EXT);
TextPtr := GlobalLock(Handle);
sClipboard := StrPas(TextPtr);
{Paste Command needs to be inserted here!}
GlobalUnlock(Handle);
finally
Clipboard.Close;
end;
Thanks.
begin
SetForeGroundWindow(iHwnd)
try
ClipBoard.Open;
Handle := Clipboard.GetAsHandle(CF_T
TextPtr := GlobalLock(Handle);
sClipboard := StrPas(TextPtr);
{Paste Command needs to be inserted here!}
GlobalUnlock(Handle);
finally
Clipboard.Close;
end;
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.