On 25.05.2011 08:56, asif saeed wrote:
> An MFC App, by default, runs in its own thread - even if your application is
> single threaded. If you link to MFC using Multi-threaded MFC DLL (which is a
> Visual C++ 2010 IDE option) then your GUI app runs in a separate thread of
> its own. Any callback functions in your app that you register with MFC get
> called fine with no problems.
>
> Does an FLTK app run in a separate GUI thread?

Why don't you try it? Okay, so far it seems that nobody here would try
this (or has done so), and you're probably on your own.

Given your later posting where you say "This library is a non-GUI MFC
library", then *maybe* it could work. The key point you would have to
take care of is (as has been written here many times, and as it is
documented somewhere in the FLTK docs) that FLTK must (or should) run
in the primary thread, and *all* GUI operations should be done by this
thread. Note that FLTK reads the Windows message queue (Fl::run(),
Fl::check() etc.), and no other part of the library must do that. Even
if that "MFC library" does not have a GUI function, it may well need to
read the message queue (that's just a guess).

End of guessing now... I suggest to try it yourself, but if you do so,
you should know something of the details of the MFC library. How are its
threads started, and what does it do WRT the Windows message queue?

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to