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.
spectrum
Filthy Rich wx Solver
Posts: 207 Joined: Sat Jul 21, 2007 12:17 pm
Post
by spectrum » Thu Apr 16, 2009 11:48 am
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
Posts: 172 Joined: Thu Jun 26, 2008 8:50 pm
Post
by rodrigod » Fri Apr 17, 2009 6:12 pm
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.