Structures


This section contains information on the following new structures used with Active Accessibility.

GUITHREADINFO

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

Carries information about a GUI thread.

cbSize
Size of this structure, in bytes.
flags
Bitmask value. This member contains a combination of the following flags that, if set, indicate that the corresponding condition is true for the specified thread.
GUI_CARETBLINKING Represents the caret's blink state. This bit is set if the caret is visible.
GUI_INMENU Represents the thread's menu state. This bit is set if the thread is in menu mode.
GUI_INMOVESIZE Represents the thread's move state. This bit is set if the thread is in a move or size loop.
GUI_POPUPMENUMODE Represents the thread's pop-up menu state. This bit is set if the thread has an active pop-up menu.
GUI_SYSTEMMENUMODE Represents the thread's system menu state. This bit is set if the thread is in a system menu mode.
hwndActive
Handle to the active window within the thread.
hwndFocus
Handle to the window that has keyboard focus.
hwndCapture
Handle to the window that has mouse capture.
hwndMenuOwner
Handle to the window that owns any active menus.
hwndMoveSize
Handle to the window in a move or size loop.
hwndCaret
Handle to the window that is displaying the caret.
rcCaret
RECT structure that describes the caret's bounding rectangle, in client coordinates, relative to the window specified by the hwndCaret member.

This structure is used with the GetGUIThreadInfo function to retrieve information about the active window or a specified GUI thread.

HARDWAREINPUT

typedef struct tagHARDWAREINPUT {
    DWORD   uMsg;
    WORD    ParamL;
    WORD    ParamH;
    DWORD   dwExtraInfo;
} HARDWAREINPUT, FAR* LPHARDWAREINPUT;

Contains information about a simulated message generated by an input device.

uMsg
Value specifying the message associated with the hardware input event.
ParamL
Low-order word of the lParam parameter for the message.
ParamH
High-order word of the lParam parameter for the message.
dwExtraInfo
A 32-bit value to be associated with the event. An application calls the GetMessageExtraInfo Win32 function to obtain this extra information.

This structure is contained by the INPUT structure and used with the SendInput function.

See also Simulating Input

INPUT

typedef struct tagINPUT {
    DWORD   type;
    union {
        MOUSEINPUT      mi;
        KEYBDINPUT      ki;
        HARDWAREINPUT   hi;
    };
} INPUT, FAR* LPINPUT;

Carries information describing simulated mouse, keyboard, or other user input.

type
Flag value indicating the type of device information this structure carries. This member is one of the following values.
INPUT_HARDWARE The hi union member is valid.
INPUT_KEYBOARD The ki union member is valid.
INPUT_MOUSE The mi union member is valid.
mi
MOUSEINPUT structure that contains information about simulated mouse input.
ki
KEYBDINPUT structure that contains information about simulated keyboard input.
hi
HARDWAREINPUT structure that contains information about a simulated input device message.

This structure is used with the SendInput sample application.

This structure contains information identical to that used in the parameter list for a call to the keybd_event, mouse_event, or hardware_event functions.

See also Simulating Input

KEYBDINPUT

typedef struct tagKEYBDINPUT {
    WORD    wVk;
    WORD    wScan;
    DWORD   dwFlags;
    DWORD   time;
    DWORD   dwExtraInfo;
} KEYBDINPUT, *PKEYBDINPUT, FAR* LPKEYBDINPUT;

Contains information about a simulated keyboard event.

wVk
Value specifying the virtual key code. This value must be between 1 and 254, inclusive. The winuser.h header file provides macro definitions (VK_*) for each value.
wScan
Value specifying the hardware scan code for the key.
dwFlags
Bitmask value containing bit flags that specify various aspects of a keystroke. These bits can be any combination of the following values.
KEYEVENTF_EXTENDEDKEY If specified, the scan code was preceded by a prefix byte that has the value 0xE0 (224).
KEYEVENTF_KEYUP If specified, the key is being released. If not specified, the key is being pressed.
time
Value indicating the time stamp for the event, in milliseconds.
dwExtraInfo
A 32-bit value to be associated with the keystroke. An application calls the Win32 GetMessageExtraInfo function to obtain this extra information.

This structure is contained by the INPUT structure and used with the SendInput function.

See also Simulating Input

MOUSEINPUT

typedef struct tagMOUSEINPUT {
    LONG    dx;
    LONG    dy;
    DWORD   mouseData;
    DWORD   dwFlags;
    DWORD   dwExtraInfo;
} MOUSEINPUT, FAR* LPMOUSEINPUT;

Carries information about a simulated mouse event.

dx and dy
Absolute or relative mouse movement on the x-axis and y-axis, in pixels.

Depending on the flags specified in the dwFlags member of the associated SendInput function call, these members indicate either an absolute position or an amount of movement since the last mouse event occurred. If the MOUSEEVENTF_ABSOLUTE bit is set in the dwFlags member, then these are absolute positions; otherwise they are relative movement values.

mouseData
Value indicating mouse wheel movement. This member is valid only if the dwFlags member contains the MOUSEEVENTF_WHEEL value. If so, then mouseData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120.

If the dwFlags member does not contain MOUSEEVENTF_WHEEL, then you must set mouseData to zero.

dwFlags
Bitmask value that can contain a combination of the following values.
MOUSEEVENTF_ABSOLUTE Specifies that the dx and dy members contain normalized absolute coordinates. If the flag is not set, the dx and dy members contain relative data: the change in position since the last reported position. This flag can be set, or not set, regardless of what kind of mouse or other pointing device, if any, is connected to the system.
MOUSEEVENTF_LEFTDOWN Specifies that the left button was pressed.
MOUSEEVENTF_LEFTUP Specifies that the left button was released.
MOUSEEVENTF_MIDDLEDOWN Specifies that the middle button was pressed.
MOUSEEVENTF_MIDDLEUP Specifies that the middle button was released.
MOUSEEVENTF_MOVE Specifies that movement occurred.
MOUSEEVENTF_RIGHTDOWN Specifies that the right button was pressed.
MOUSEEVENTF_RIGHTUP Specifies that the right button was released.
MOUSEEVENTF_WHEEL Windows NT only: Specifies that the wheel was moved, if the mouse has a wheel. The amount of movement is specified in mouseData.
dwExtraInfo
A 32-bit value to be associated with the mouse event. An application can call the GetMessageExtraInfo Win32 function to retrieve this extra information.

This structure is contained by the INPUT structure and used with the SendInput function.

See also Simulating Input

© 1997 Microsoft Corporation. All rights reserved. Legal Notices.