simon wrote: > Hello. I'm new here so this is probably an easy question. I created a > GUI using FLUID, and then FLUID created the C++ file and the .h files. > > I opened Visual Studio and created a project with these two files. When I > compiled the GUI came up. > > The problem is that I put a Call Back function on one of the buttons. The > function is supposed to just do a simple prinf command. When I pushed the > button nothing came up on the output window of Visual Studio. > > So to recap. The program compiles fine and the GUI is created, but the > function on the button isn't working. > > Can anyone help? thank you.
Try replacing the printf with fl_message. That will pop up a dialog box. The syntax is the same, so all you do is replace the text "printf" with "fl_message". You will also need to include FL/fl_ask.H (that is, if you are using FLTK 1.1.x I don't use Windows, but with KDevelop (Linux IDE), the stdout is buffered. The only way to be guaranteed that the printf's will appear is to use fprintf(stderr, ...) or launch the app in a console. In your example though, a fl_message should be appropriate as well. -- Alvin _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

