5#include "private/qcapturablewindow_p.h"
15 auto titleLength = ::GetWindowTextLengthW(hwnd);
16 std::wstring
buffer(titleLength, L
'\0');
17 titleLength = ::GetWindowTextW(hwnd,
buffer.data(), titleLength);
18 buffer.resize(titleLength);
27 auto windowHandler = [](HWND hwnd, LPARAM lParam) {
30 auto windowData = std::make_unique<QCapturableWindowPrivate>();
33 windows.push_back(windowData.release()->create());
38 ::EnumWindows(windowHandler,
reinterpret_cast<LPARAM
>(&
result));
45 const auto hwnd =
reinterpret_cast<HWND
>(
window.id);
46 return hwnd && ::GetAncestor(hwnd, GA_ROOT) == hwnd;
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromStdWString(const std::wstring &s)
Returns a copy of the str string.
bool isWindowValid(const QCapturableWindowPrivate &window) const override
QList< QCapturableWindow > windows() const override
Combined button and popup list for selecting options.
static QT_BEGIN_NAMESPACE QString windowTitle(HWND hwnd)