i have some windows or some dialog boxes contained edit control that run concurrently. So there is just one window that active or got focus. how can we move the focus from the current active window to the other without clicked those window that i wanted tobe active ? i mean for example if the active window has a menu namely move focus and when we choosed that menu the focus must be moved to the other window that i wanted. how can we do that ?
Posted on 2001-04-06 02:06:00 by newbies
SetFocus may be the API for you!

invoke SetFocus, hOtherWindow
mov hOldWindow, eax
SetFocus will put the keyboard focus on the window provided in its only argument, and its return value is (if it succeeds) is the hwnd of the previous window to have focus. Mirno
Posted on 2001-04-06 06:13:00 by Mirno
how can i got the handle of the window that i want it tobe active ? what is the function to get the window handle especially in another instances ?
Posted on 2001-04-06 06:47:00 by newbies
hi, use FindWindow or FindWindowEx for child windows
Posted on 2001-04-06 07:30:00 by ensein
If you've created them yourself you already have their handles(returned by CreateWindow, CreateDialogParam,etc.. calls). If they are controls on a dialog box use GetDlgItem,hDlg,IDC_WHATEVER. Then you just have to call SetFocus and voila!
Posted on 2001-04-06 07:43:00 by brewmanchu
FindWindow need to know about the name of class and window name. what about if i don't know about that information or where can i find the info about class paired with the name of the window ? is there any simpler way ?
Posted on 2001-04-09 07:01:00 by newbies