Michael Schmid wrote:
> Is it possible that show() (2nd last line) needs some arguments?
No, it doesn't need it, although it might look better, if you call
pMainWin->show(argc,argv);
provided that your main function has these standard arguments.
This will also enable you to use some commandline arguments when
starting the program.
> Michael Schmid schrieb:
...
>> Below you find (a shortened) piece of code. I can compile the code.
>> But if I execute it, it immediately terminates. Without any error or
>> so...
Currently I don't see anything wrong with this code, maybe you shortened
it too much. I'm assuming that all pointers like "pMainWin" are of the
correct type and such (but probably this wouldn't matter anyway, if you
can compile the code).
>> But I think "Fl:run();" should wait until the last window closed and
>> returns then?
Yes, that's how it works.
>> What is wrong, i don't get it...
>>
>> //Start Main-Window:
>> { pMainWin = new Fl_Double_Window(840, 480, "IPRO2");
>> pMainWin->color((Fl_Color)0x0);
>> pMainWin->begin();
>> { //Start drawing buttons of main menu
>> pMainButtonTuning = new
>> Fl_Button(UPPER_BORDER_MAIN_MENU, 37, 124, 37);
>> pMainButtonTuning->image(pPixmapTuningPressed);
>>
>> pMainButtonTuning->callback((Fl_Callback*)fCallbackButtonTuning);
>> pMainButtonTuning->when(FL_WHEN_CHANGED);
>> } //End drawing buttons of main menu
>> pMainWin->end();
>> } //Fl_Double_Window* pMainWin
>> pMainWin->show();
>> return Fl::run();
If you could provide a complete example program, people here could try
it by just using "fltk-config --compile" to compile and run your
program. If it doesn't work, I'm sure that someone here would find out,
why...
You could, e.g. remove the callback code, because this wouldn't be
needed, but don't forget any needed headers and the main function.
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk