GUITHREADINFO structure

Contains information about a GUI thread.

Syntax

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

Members

        `cbSize`

        Type: <b>DWORD</b>

The size of this structure, in bytes. The caller must set this member to sizeof(GUITHREADINFO).

        `flags`

        Type: <b>DWORD</b>

The thread state. This member can be one or more of the following values.

Value Meaning
GUI_CARETBLINKING
0x00000001
The caret's blink state. This bit is set if the caret is visible.
GUI_INMENUMODE
0x00000004
The thread's menu state. This bit is set if the thread is in menu mode.
GUI_INMOVESIZE
0x00000002
The thread's move state. This bit is set if the thread is in a move or size loop.
GUI_POPUPMENUMODE
0x00000010
The thread's pop-up menu state. This bit is set if the thread has an active pop-up menu.
GUI_SYSTEMMENUMODE
0x00000008
The thread's system menu state. This bit is set if the thread is in a system menu mode.
`hwndActive`
        Type: <b>HWND</b>

A handle to the active window within the thread.

        `hwndFocus`

        Type: <b>HWND</b>

A handle to the window that has the keyboard focus.

        `hwndCapture`

        Type: <b>HWND</b>

A handle to the window that has captured the mouse.

        `hwndMenuOwner`

        Type: <b>HWND</b>

A handle to the window that owns any active menus.

        `hwndMoveSize`

        Type: <b>HWND</b>

A handle to the window in a move or size loop.

        `hwndCaret`

        Type: <b>HWND</b>

A handle to the window that is displaying the caret.

        `rcCaret`

        Type: <b><a href="/windows/desktop/api/windef/ns-windef-rect">RECT</a></b>

The caret's bounding rectangle, in client coordinates, relative to the window specified by the hwndCaret member.

## Remarks
    This structure is used with the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getguithreadinfo">GetGUIThreadInfo</a> function to retrieve information about the active window or a specified GUI thread.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header winuser.h (include Windows.h)
Redistributable Service Pack 3
## See Also

    <b>Conceptual</b>

GetGUIThreadInfo

Reference

Windows