hello,

the situaton;
My progam, call it A.exe, starts another program, call it B.exe.
At a certain stage program A fills several edit controls with text strings.
(Belonging to program B, B.exe)
these are Name, Last-name, address, City.
(Using keybd_event or Sendinput, both work fine)
everything woks fine if the user does not interfear.
as soon as the user set the tab-caret on let say the address line, the text
string sending sequence is wrong, (name will be places in the address line, address in the
city line etc. and also the Next and Back button control get input, resulting in strange
behaviuor.

I can find all the Control IDs using,
pWndx->GetDlgCtrlID(); (where x is between 1 and the amount of CtrlIDs)

I can even find and change the text of the buttons using
pWnd->GetDlgItemText(1, text);
pWnd->SetDlgItemText(1, text);

I can move the TAB-caret around using;
keybd_event
sendinput
pWnd->SendMessage(WM_NEXTDLGCTL,0,0);

What I want is to set the TAB-caret at a certain place, Yes the name line.
or
If there is a test to check where the TAB-caret is that would be fine aswell.
So I can move it before sending the text strings.

So WM_NEXTDLGCTL is useless if you do not know where the caret is, I dont think
microsoft overlooked something, so where do I go wrong...

other options, how do I edit the edit-control class directly, using Spy++ I found out
there is a handle to the control, so it should be possible to put the text string in the
structure directly

regards,

Ger