Windows Vista Forums

getting handle of child window with input focus

  1. #1


    Bob Guest

    getting handle of child window with input focus

    There's a Windows API function that provides various information about
    top-level windows, but I can't remember its name. One of the values it
    makes available is the window handle of the child window that has the input
    focus.

    Hopefully that's enough info so someone will think of the name of the
    function and post it for me

    Thanks,
    Bob


      My System SpecsSystem Spec

  2. #2


    Bob Guest

    Re: getting handle of child window with input focus

    typedef struct tagGUITHREADINFO {
    DWORD cbSize;
    DWORD flags;
    HWND hwndActive;
    HWND hwndFocus;
    HWND hwndCapture;
    HWND hwndMenuOwner;
    HWND hwndMoveSize;
    HWND hwndCaret;
    RECT rcCaret;
    } GUITHREADINFO, *PGUITHREADINFO;

    BOOL GetGUIThreadInfo( DWORD idThread,
    LPGUITHREADINFO lpgui
    );

    DWORD GetWindowThreadProcessId( HWND hWnd,
    LPDWORD lpdwProcessId
    );

    "Bob" <spam@xxxxxx> wrote in message
    news:eS8k80v$IHA.4528@xxxxxx

    > There's a Windows API function that provides various information about
    > top-level windows, but I can't remember its name. One of the values it
    > makes available is the window handle of the child window that has the
    > input focus.
    >
    > Hopefully that's enough info so someone will think of the name of the
    > function and post it for me
    >
    > Thanks,
    > Bob
    >

      My System SpecsSystem Spec

getting handle of child window with input focus

Similar Threads
Thread Forum
click in a IE child window
Hello, When I do a Ricerca.click I get a child window with the results of the search. Is there a way to click to an item in the child window?...
VB Script
Window Focus
Hi Everyone I was having some trouble, with my open windows changing focus as some event occurs or something is processed in a windows that is...
Vista General
Window Focus
Is there anyway to turn OFF having completed windows changing focus of a window to the front? Ex: If I'm working on multiple tabs and one of the...
Vista General
Input focus lost at logon screen
Whenever I start the computer and the logon screen loads, the cursor in the password text box loses focus after a few seconds. I then have to either...
Vista General
Window Focus bug
Vista often looses track of which window should have focus - so that if you're using the keyboard & despite message box having focus you can't type...
Vista General
WPF Child Window Question
From a WPF Newbie -- I have an application main window and I want to have a visual container of some sort that will contain a collection of child...
Avalon
Host App in WPF child window
Is this completely impossible, or is there a way this might be done or simulated? I'd like to launch a process in a WPF app and have the process...
Avalon