Page 1 of 1

How to applications-path

Posted: Mon May 28, 2018 3:00 pm
by art-ganseforth
Hello,

a quiet simple thing, but i don't know how to search the dcoumentation for this: I need the name of the folder, where my application is started from. How to get it??

Best,
Frank

Re: How to applications-path

Posted: Mon May 28, 2018 3:35 pm
by doublemax
http://docs.wxwidgets.org/trunk/classwx ... 0cfbb35c6b
Gives you the complete path for the executable, you can extract the path from there.

Make sure to use the global instance with wxStandardPaths::Get(), don't create a new instance of it.

Re: How to applications-path

Posted: Mon May 28, 2018 4:11 pm
by art-ganseforth
Thank you!

Re: How to applications-path

Posted: Tue Jun 05, 2018 1:29 pm
by art-ganseforth
I Searched some very old codes because i remembered that there was another solution. There i found this:

Code: Select all

IMPLEMENT_APP(Projekt1DlgApp)

bool Projekt1DlgApp::OnInit() {
	wxString filename = wxString(argv[0]);
       ...
}