This function retrieves the length, in characters, of the specified window's title bar text — if the window has a title bar. If the specified window is a control, the function retrieves the length of the text within the control.
The length, in characters, of the text indicates success. Under certain conditions, this value may actually be greater than the length of the text. For more information, see the following Remarks section. Zero indicates that the window has no text. To get extended error information, call GetLastError.