I have a little problem with gtkmm and threads





Excume for my bad english

Excuse me for my bad English


I have a problem that I think is simple for experienced developers but not for a beginner like me.


The think that i want to do is the next:


I have a very big code and I want to include a little window (made in gtkmm) in it. The window will present the results at any time of my code.


The problem is that when i want run the window with Gtk::Main::run(window) my code stop until I close the window. Then my window don't present any result. And the thing that I want is that my window runs without stop my principal code.


I tried with pthreads the next code:


   Gtk::Main kit();
ExampleWindow window;


pthread_t threadWindow;

pthread_create(&threadWindow,NULL,Gtk::Main::run,window); // create threads
my code continue here

And logically don't works. I read many faqs but alls are very complicated for the thing that i want to do. I somebody can give me a clear example I will apreciate it.





César Flores



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]