mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
28 lines
409 B
C++
28 lines
409 B
C++
#include <CtrlLib/CtrlLib.h>
|
|
|
|
using namespace Upp;
|
|
|
|
struct MyAppWindow : TopWindow {
|
|
void Exit() {
|
|
if(PromptOKCancel("Exit MyApp?"))
|
|
Break();
|
|
}
|
|
|
|
void RightDown(Point, dword) override {
|
|
MenuBar::Execute(
|
|
[=](Bar& bar) {
|
|
bar.Add("Exit", [=] { Exit(); });
|
|
}
|
|
);
|
|
}
|
|
|
|
MyAppWindow() {
|
|
Title("My application with local menu").Sizeable();
|
|
}
|
|
};
|
|
|
|
GUI_APP_MAIN
|
|
{
|
|
MyAppWindow app;
|
|
app.Run();
|
|
}
|