wxApp restart

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

wxApp restart

Post by spectrum »

Hi all,

need a suggestion about the best way to restart an application.

I am trying

Code: Select all

 Hide();
 wxTheApp->GetTopWindow()->Hide();

 wxProcess::Open (Process::get().GetBinaryPath() + "/cc.exe");

 wxTheApp->GetTopWindow()->Close();

but seems the new restarted app crash as soon as is started.

thanks,

spectrum
spectrum
rodrigod
I live to help wx-kind
I live to help wx-kind
Posts: 172
Joined: Thu Jun 26, 2008 8:50 pm

Post by rodrigod »

I think it is because when you closed the top window you close any other application it launched, so your restarted doesnt crash, it is closed.

Try making some tests to confirm it.
Post Reply