Page 1 of 1

wxExecute?

Posted: Sat Jul 11, 2015 11:24 am
by Anthony11

Code: Select all

wxExecute("help\\documentation.chm");
also tried

Code: Select all

wxExecute(".\\help\\documentation.chm");
shows messagebox (error 0)

Re: wxExecute?

Posted: Sat Jul 11, 2015 11:43 am
by doublemax
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

Re: wxExecute?

Posted: Thu Aug 13, 2015 12:33 pm
by whoops

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
[/size]