ultimatepp/tutorial/Gui08/main.cpp
cxl 2e4b276e07 Merge continued
git-svn-id: svn://ultimatepp.org/upp/trunk@10263 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-10-04 08:34:39 +00:00

28 lines
400 B
C++

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyAppWindow : TopWindow {
void Exit() {
if(PromptOKCancel("Exit MyApp?"))
Break();
}
void RightDown(Point, dword) {
MenuBar::Execute(
[=](Bar& bar) {
bar.Add("Exit", [=] { Exit(); });
}
);
}
MyAppWindow() {
Title("My application with local menu").Sizeable();
}
};
GUI_APP_MAIN
{
MyAppWindow app;
app.Run();
}