Function Reference


_WinAPI_SetWindowText

Changes the text of the specified window's title bar

#include <WinAPISysWin.au3>
_WinAPI_SetWindowText ( $hWnd, $sText )

Parameters

$hWnd Handle to the window or control whose text is to be changed
$sText String to be used as the new title or control text

Return Value

Success: True
Failure: False, call _WinAPI_GetLastError() to get extended error information

Remarks

If the target window is owned by the current process, SetWindowText causes a $WM_SETTEXT message to be sent to
the specified window or control. If the control is a list box control created with the $WS_CAPTION style,
however, SetWindowText sets the text for the control, not for the list box entries. To set the text of a
control in another process, send the $WM_SETTEXT message directly instead of calling SetWindowText.

See Also

Search SetWindowText in MSDN Library.