Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

MenuBarCheck

 

Demonstrates the use of local menu with checked item

 

 

main.cpp

 

#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();

}

 

 

 

 

Do you want to contribute?