i want to get the active textbox . or to be more correctly to get the selected text on the textbox .

my problem isnot with the sleected text. its realy easy to get

my problem is to get the active textbox. how can i do that ??

i thought to do this with a mouse over ( WindowFromPoint)
but i dont want to use the mouse for this .

anyone have ideas ? maybe something with getactivewindow?


Posted on 2001-10-07 09:36:14 by eko
here you go:
Invoke SetFocus, hEdit
Posted on 2001-10-07 10:52:30 by NEMO

i think i wasnt clear enough .
i dont want to setfocus on the textbox -

i need to get the active textbox.

forthis i use getactivewindow -

now i need to get the active textbox( achild window of the active window )
errr. its kinda hard to explain .

basicly to get the uses textbox on the current active window

hope it was more clearly

Posted on 2001-10-07 11:04:10 by eko
It is just an idea, but why not to handle the notification message EN_SETFOCUS storing in a variable the actual focused edit control?
The EN_SETFOCUS notification message is sent when an edit control receives the keyboard focus. The parent window of the edit control receives this notification message through the WM_COMMAND message.

idEditCtrl = (int) LOWORD(wParam); // identifier of edit control
wNotifyCode = HIWORD(wParam); // notification code
hwndEditCtrl = (HWND) lParam; // handle of edit control
Posted on 2001-10-07 11:30:25 by LuHa