I am working on a keyboard replacement for Pocket PC.
Is there a way to get the text and the current cursor position of the
window that has the focus?
it is easy to do in the same process:
- GetFocus - get a focus window
- GetWindowText - get text
- you can use EM_GETSEL for a cursor position, if selection is empty
If you are in another process GetFocus won't work.
In fact you don't need all these tricks if you implement your keyboard
replacement as a custom input method. See the following article for details:
Microsoft MVP - Mobile Devices
Smartphone Developer Network
Quote:> I am working on a keyboard replacement for Pocket PC.
> Is there a way to get the text and the current cursor position of the
> window that has the focus?
I just want to implement a simple "Copy to Clipboard" Routine
from a main Menu. And therefore I have to get the HWND of the
Is there a API Function to get the HWND of an active (= Control
that has the focus) Edit-Control ?
2. date problem