ultimatepp/upptst/MenuBarExecute/main.cpp
cxl 50f2b0410b .upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@14662 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-07-07 09:36:21 +00:00

21 lines
367 B
C++

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyApp : public TopWindow {
virtual void RightDown(Point p, dword keyflags);
};
void MyApp::RightDown(Point p, dword keyflags)
{
MenuBar b;
b.Add("Action", [] { PromptOK("Action invoked"); });
if(!b.Execute())
PromptOK("Menu canceled");
}
GUI_APP_MAIN
{
MyApp app;
app.Run();
}