GetWindowTextLength function user32

int GetWindowTextLength(
  1. int hWnd
)

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. However, GetWindowTextLength cannot retrieve the length of the text of an edit control in another application.

int GetWindowTextLengthW(
  HWND hWnd
);

Implementation

int GetWindowTextLength(int hWnd) => _GetWindowTextLength(hWnd);