#include #include #include #include using namespace std; void button_cb(Fl_Widget* wid){ Fl_Button* but = (Fl_Button*)wid; if(but->label()=="&Good job"){ but->label("&Click me"); } else but->label("&Good job"); but->redraw(); } int main(int argc, char **argv) { Fl_Window win(300,200,"Testing"); int i = 7; win.begin(); Fl_Button but(20,150,70,30,"&Click me"); win.end(); but.callback(button_cb); win.show(); return Fl::run(); }