mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@5927 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ff952d5df4
commit
41c6bb5faf
3 changed files with 41 additions and 0 deletions
26
reference/MenuBarCheck/main.cpp
Normal file
26
reference/MenuBarCheck/main.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
typedef MyApp CLASSNAME;
|
||||
|
||||
bool check;
|
||||
|
||||
void Check() { check = !check; }
|
||||
|
||||
void RightDown(Point p, dword) {
|
||||
MenuBar bar;
|
||||
bar.Add("Check", THISBACK(Check)).Check(check);
|
||||
bar.Execute();
|
||||
}
|
||||
|
||||
MyApp() {
|
||||
check = false;
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue