Paste too fast

From: Jean-Pierre Lamon (gipi_removeme_at_ngscan.com)
Date: 11/20/03


Date: Thu, 20 Nov 2003 19:09:31 +0100

Hi all,

I'm gonna try to be comprehensible :-)
I have an application that must copy some datas from a db into a set of
TMemo in another application.
I can find the external window with
WndName := 'MARC editor';
Wnd := FindWindow('TeditorWindow', PChar(WndName));
wnd := GetFocused(wndName);

Then, I can create a new TMemo in this external window sending some
shortcuts.
The new TMemo is created and empty. And I want to fill it with my DB's
datas.

WndChild := FindWindowEx(FindWindow('TeditorWindow', PAnsiChar(WndName)), 0,
'TMemo', PAnsiChar(''));

I fetch my DB, and datas are copied into the clipboard. I then paste them
sending a:
SendMessage(wndChild, wm_paste, 0, 0);

The datas are copied, it's ok. But sometimes, not in the right place. A new
TMemo is created before the datas are pasted. And the datas are pasted in
this new TMemo, not the pred one. What can I do to make my application wait
for datas being well pasted before launching a new TMemo creation.

Thx in advance



Relevant Pages

  • Re: Paste too fast
    ... My external application has a window. ... TMemo, I have to write some datas from a record (about 10 fields, so 10 ... Then I create the Memo. ... My datas are on the clipboard. ...
    (borland.public.delphi.nativeapi)
  • Re: Paste too fast
    ... one for memo creation and one for data paste. ... that app sometimes pastes data into wrong memo. ... > I have an application that must copy some datas from a db into a set of ... > TMemo in another application. ...
    (borland.public.delphi.nativeapi)