★★★GetAltTabInfo Function <br><br>--------------------------------------------------------------------------------<br><br>The GetAltTabInfo function retrieves status information for the specified window<br>if it is the application-switching (ALT+TAB) window.<br><br>Syntax<br><br>BOOL GetAltTabInfo( HWND hwnd,<br> int iItem,<br> PALTTABINFO pati,<br> LPTSTR pszItemText,<br> UINT cchItemText<br>);<br><br>Parameters<br><br>hwnd<br>[in] Handle to the window for which status information will be retrieved.<br>This window must be the application-switching window. <br>iItem<br>[in] Specifies the index of the icon in the application-switching window.<br>If the pszItemText parameter is not NULL, the name of the item is copied to<br>the pszItemText string. If this parameter is –1, the name of the item is not copied. <br>pati<br>[out] Pointer to an ALTTABINFO structure to receive the status information.<br>Note that you must set ALTTABINFO.csSize to sizeof(ALTTABINFO) before calling this function. <br>pszItemText<br>[out] Pointer to a string that receives the name of the item. If this parameter<br>is NULL, the name of the item is not copied. <br>cchItemText<br>[in] Specifies the size, in TCHARs, of the pszItemText buffer. <br>Return Value<br><br>If the function succeeds, the return value is nonzero. <br><br>If the function fails, the return value is zero.<br>To get extended error information, call GetLastError. <br><br><br><br>Remarks<br><br>The application-switching window enables you to switch to the most recently used<br>application window. To display the application-switching window, press ALT+TAB.<br>To select an application from the list, continue to hold ALT down and press TAB<br>to move through the list. Add SHIFT to reverse direction through the list.<br><br>Windows 95/98/Me: GetAltTabInfoW is supported by the Microsoft? Layer for Unicode (MSLU).<br>To use this, you must add certain files to your application, as outlined in Microsoft Layer<br>for Unicode on Windows 95/98/Me Systems.<br><br>Function Information<br><br>Header Declared in Winuser.h, include Windows.h <br>Import library User32.lib <br>Minimum operating systems Included in Windows 98, Windows NT 4.0 SP6 <br>Unicode Implemented as Unicode and ANSI versions on Windows NT, Windows 2000, Windows XP <br><br><br>★★★ALTTABINFO Structure <br><br>--------------------------------------------------------------------------------<br><br>The ALTTABINFO structure contains status information for the application-switching (ALT+TAB) window.<br><br>Syntax<br><br>typedef struct {<br> DWORD cbSize;<br> int cItems;<br> int cColumns;<br> int cRows;<br> int iColFocus;<br> int iRowFocus;<br> int cxItem;<br> int cyItem;<br> POINT ptStart;<br>} ALTTABINFO, *PALTTABINFO, *LPALTTABINFO;<br>Members<br><br>cbSize<br>Specifies the size, in bytes, of the structure. The caller must set this to sizeof(ALTTABINFO). <br>cItems<br>Specifies the number of items in the window. <br>cColumns<br>Specifies the number of columns in the window. <br>cRows<br>Specifies the number of rows in the window. <br>iColFocus<br>Specifies the column of the item that has the focus. <br>iRowFocus<br>Specifies the row of the item that has the focus. <br>cxItem<br>Specifies the width of each icon in the application-switching window. <br>cyItem<br>Specifies the height of each icon in the application-switching window. <br>ptStart<br>Specifies the top-left corner of the first icon. <br>Structure Information<br><br>Header Declared in Winuser.h, include Windows.h <br>Minimum operating systems Included in Windows 98, Windows NT 4.0 Service Pack 6 <br><br><br>★★★Delphi中的声明:<br>function GetAltTabInfo(hwnd: HWND; iItem: Integer; var pati: TAltTabInfo;<br> pszItemText: PChar; cchItemText: UINT): BOOL; stdcall;<br><br>