This is very limiting "softkeyboard" application. You don't need the second applications with edit box. Before I explain how to make a real
Virtual Keyboard, let's finish with the design based on edit box. I think you use the edit box to type text using the "softkeyboard"; and the typed text you can later move to any other application using clipboard. If so, you would need to include it in the same application and process as the keyboard; in this way you can pass a handler to the edit box HWND and send messages to it. Is is something you're doing? This is very limiting approach.
You can create a real
Virtual Keyboard which can type directly in any application.
For this purpose, you need to use just two techniques:
Simulate keyboard on a low level using Windows API
Solve the problem of keyboard focusing and activation. To simulate typing in any window of any application, you need to keep the keyboard focus in this window. That means the parent pop-up window of this application should be activated and the text input control should have the keyboard focus. When you try to click on a button of a Virtual Keyboard it would be activated and the key focused which would make typing impossible. To prevent this, your Virtual Keyboard window should combine style
("always on top") and
. In raw Windows API, these styles are setup in the call to
, see http://msdn.microsoft.com/en-us/library/ms632680(v=vs.85).aspx
Look at this article by Hans Dietrich
XKeyboard - on-screen keyboard