If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Knows some wx things
Knows some wx things
Posts: 30
Joined: Sun Jul 05, 2015 7:14 am


Postby Anthony11 » Sat Jul 11, 2015 11:24 am

Code: Select all


also tried

Code: Select all


shows messagebox (error 0)

User avatar
Posts: 12398
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxExecute?

Postby doublemax » Sat Jul 11, 2015 11:43 am

These are not executable files. The one who opens the correct application when you open them is Windows Explorer.

In wxWidgets use wxLaunchDefaultApplication:
http://docs.wxwidgets.org/trunk/group__ ... f82b2d66c3
Use the source, Luke!

User avatar
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 27, 2015 5:53 am
Location: China

Re: wxExecute?

Postby whoops » Thu Aug 13, 2015 12:33 pm

you can simply using the following code:

Code: Select all

// ...
   const char *helpFile = "help\\documentation.chm";
   bool executed = wxShell(helpFile);
   if ( !executed )
      wxLogDebug( wxString::Format(wxT("Failed to open \"%s\""), helpFile) );
// ...

here is the documentation on wxShell
bool wxShell ( const wxString & command = wxEmptyString )
Executes a command in an interactive shell window.
If no command is specified, then just the shell is spawned.

See Also
wxExecute(), External Program Execution Sample

Include file:
#include <wx/utils.h>

so, you know "documentation.chm" isn't a execution sample
 Things being equal, the simplest explanation tends to be the right.

 [ Windows 7 Ultimate x64 | wxWidgets 3.0.2 | Microsoft Visual C++ 2010 Express ]

Return to “wxDev-C++”

Who is online

Users browsing this forum: No registered users and 2 guests