hi

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
with EM_GETSEL and EM_GETSELTEXT

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?

bye

eko
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
hi


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

bye
eko
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?
EN_SETFOCUS
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.

EN_SETFOCUS
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