#include <CtrlLib/CtrlLib.h> using namespace Upp; struct MyApp : TopWindow { Array<Ctrl> ctrl; MyApp() { auto& b = ctrl.Create<Button>(); Add(b.TopPos(10).LeftPos(10, 100)); b.SetLabel("Close me!"); b << [&] { PostCallback([=] { ctrl.Remove(0); }); }; } }; GUI_APP_MAIN { MyApp().Run(); }
Report message to a moderator