> void dMainWin::cb_button_app(Fl_Button * button, void* m_win)
> {
> button->deactivate();
> Fl::check();
> system("./app");
> button->activate();
> Fl::check();
> }
Your problem is that "system" generally will not return until the "app"
it launches finishes. So fltk is stuck in the callback waiting for your
app to finish.
You want to find another way to launch your app, "system" is a poor tool
in most cases...
What platform are you on? That makes a difference.
On OSX, and maybe win32, it may be enough to use "open" to invoke your
app. Or maybe, on win32, try ShellExecute().
On unix, you probably want execv().
Actually - now I think of it, there's an ideal "worked example" of how
to launch external programs in the file "fl_open_uri.cxx" - check the
code there and see how it achieves the result.
However: You don't want to be doing any significant amount of processing
in the button callback - rather, you want the button callback just to
signal that the app should launch and do the real work "elsewhere" in
your program.
If you have the source for the app, it would probably be cleaner to
build the GUI into it, rather than just trying to wrap it around an
existing executable.
The examples in the test folder show a variety of approaches you could
try...
> i have problems with re-drawing my button-tool bar (my fltk
> application) when i cross with some other window across
> everything inside my window vanish..
This sounds like your code is not allowing the fltk run-loop to proceed
- possibly due to the problem identified above.
Again, I can only suggest you study the examples. If you are still have
this problem, post a minimal compilable example that exhibits the error,
and we can show you how to proceed.
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk