| 1274 | auto wnd = reinterpret_cast<HWND>(args[0].toPointer()); |
| 1275 | if (!IsWindow(wnd)) return false; |
| 1276 | return Window::text(wnd).toStdString(); |
| 1277 | } |
| 1278 | }; |
| 1279 | struct QiFunc_wnd_text_set : public QiFunc |
| 1280 | { |
| 1281 | QiFunc_wnd_text_set() : QiFunc(2) {} |
| 1282 | QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override |
| 1283 | { |
| 1284 | auto wnd = reinterpret_cast<HWND>(args[0].toPointer()); |
| 1285 | if (!IsWindow(wnd)) return false; |
| 1286 | return SetWindowTextW(wnd, args[1].toWString().c_str()) != FALSE; |
| 1287 | } |
| 1288 | }; |
| 1289 | struct QiFunc_wnd_class : public QiFunc |