getWindowText method
Returns this Window text.
- Calls Win32 getWindowTextLength and GetWindowText.
- See getWindowTextLength.
Implementation
String getWindowText({int? length}) {
length ??= getWindowTextLength();
final strPtr = wsalloc(length + 1);
GetWindowText(hwnd, strPtr, length + 1);
final str = strPtr.toDartString();
return str;
}