ultimatepp/tutorial/Gui08/main.cpp
mdelfede 263ff5f895 changed svn layout
git-svn-id: svn://ultimatepp.org/upp/trunk@281 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-06-07 22:31:27 +00:00

30 lines
454 B
C++

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