ultimatepp/tutorial/Gui06/main.cpp
cxl 70d8b6d67a .tutorial
git-svn-id: svn://ultimatepp.org/upp/trunk@15651 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2021-01-07 10:56:31 +00:00

28 lines
518 B
C++

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyAppWindow : TopWindow {
void Close() override {
delete this;
}
void LeftDown(Point pos, dword flags) override {
(new MyAppWindow)->OpenMain();
}
void Paint(Draw& w) override {
w.DrawRect(GetSize(), SWhite());
w.DrawText(0, 0, "Click the view area to open next window!", Arial(20));
}
MyAppWindow() {
Title("My multiwindowed application").Zoomable().Sizeable();
}
};
GUI_APP_MAIN
{
(new MyAppWindow)->OpenMain();
Ctrl::EventLoop();
}