#include <QCoreApplication>#include <windows.h>QString getWindowTitle(HWND hWindow){ wchar_t wtitle[1024]; int len = GetWindowText(hWindow, LPWSTR(wtitle), sizeof (wtitle) - sizeof (wchar_t)); if (len <= 0) return QString(); else return QString::fromWCharArray(wtitle);}int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); HWND hRoot = GetDesktopWindow(); HWND hWindow = GetWindow(hRoot, GW_CHILD); int i = 25; while (hWindow != nullptr) { QString win_title = getWindowTitle(hWindow); if (win_title.contains("Блокнот")) { MoveWindow(hWindow, i, i, 500, 400, true); i += 25; } hWindow = GetWindow(hWindow, GW_HWNDNEXT); } // return a.exec();}