getWindowText method

String getWindowText({
  1. int? length,
})

Returns this Window text.

Implementation

String getWindowText({int? length}) {
  length ??= getWindowTextLength();
  final strPtr = wsalloc(length + 1);
  GetWindowText(hwnd, strPtr, length + 1);
  final str = strPtr.toDartString();
  return str;
}