GetWindowText function user32

int GetWindowText(
  1. int hWnd,
  2. Pointer<Utf16> lpString,
  3. int nMaxCount
)

Copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is a control, the text of the control is copied. However, GetWindowText cannot retrieve the text of a control in another application.

int GetWindowTextW(
  HWND   hWnd,
  LPWSTR lpString,
  int    nMaxCount
);

Implementation

int GetWindowText(int hWnd, Pointer<Utf16> lpString, int nMaxCount) =>
    _GetWindowText(hWnd, lpString, nMaxCount);