GetAltTabInfoA function (winuser.h)
Retrieves status information for the specified window if it is the application-switching (ALT+TAB) window.
Syntax
BOOL GetAltTabInfoA(
[in, optional] HWND hwnd,
[in] int iItem,
[in, out] PALTTABINFO pati,
[out, optional] LPSTR pszItemText,
[in] UINT cchItemText
);
Parameters
[in, optional] hwnd
Type: HWND
A handle to the window for which status information will be retrieved. This window must be the application-switching window.
[in] iItem
Type: int
The index of the icon in the application-switching window. If the pszItemText parameter is not NULL, the name of the item is copied to the pszItemText string. If this parameter is –1, the name of the item is not copied.
[in, out] pati
Type: PALTTABINFO
A pointer to an ALTTABINFO structure to receive the status information. Note that you must set the csSize member to sizeof(ALTTABINFO)
before calling this function.
[out, optional] pszItemText
Type: LPTSTR
The name of the item. If this parameter is NULL, the name of the item is not copied.
[in] cchItemText
Type: UINT
The size, in characters, of the pszItemText buffer.
Return value
Type: BOOL
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The application-switching window enables you to switch to the most recently used application window. To display the application-switching window, press ALT+TAB. To select an application from the list, continue to hold ALT down and press TAB to move through the list. Add SHIFT to reverse direction through the list.
Note
The winuser.h header defines GetAltTabInfo as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
See also
Conceptual
Reference