1

Does anyone know how to send a text from a Delphi app to a java app RICHEDIT50W control? I have tried this, but it does not work:

oPinWindowHandle := FindWindow(nil, 'My Caption');
oRichEditControl := FindWindowEx(oPinWindowHandle, 0, 'RICHEDIT50W', nil);
SendMessage(oRichEditControl, WM_SETTEXT, 0, LongInt(PChar(msg)));

Both oRichEditControl and oPinWindowHandle have a valid handle.

EDIT

SendMessage is working fine. It returns 1. Maybe the app is blocking messages ou even handle its own message. Is there any way to find which messages the app accepts?

Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121

1 Answers1

0

I just found out that the app was blocking some messages, and then I came across to this thread:

Sending an application keystrokes with “SendMessage”

Which helped me a lot to bypass the issue.

Community
  • 1
  • 1
Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121