/
dinruspro
/
tutorial
Обзор
Документация
Войти
/
dinruspro
/
tutorial
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
Gui05/main.cpp
34 строки
555 B
EnergonV
Уроки теперь тоже здесь!
09 янв 2024, 19:25
09 янв 2024, 19:25
4b3ebd6
Код
Авторство
О чём код?
#include <CtrlLib/CtrlLib.h> using namespace Upp; struct MyAppWindow : TopWindow { Point p; String text; void LeftDown(Point pos, dword flags) override { p = pos; Refresh(); } void MouseMove(Point pos, dword flags) override { text = Format("[%d:%d]", pos.x, pos.y); Refresh(); } void Paint(Draw& w) override { w.DrawRect(GetSize(), SWhite); w.DrawText(p.x, p.y, text, Arial(20), Magenta); } MyAppWindow() { Title("My application").Zoomable().Sizeable(); p.x = p.y = 0; } }; GUI_APP_MAIN { MyAppWindow app; app.Run(); }