How to applications-path Topic is solved

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
art-ganseforth
Earned some good credits
Earned some good credits
Posts: 147
Joined: Mon Sep 01, 2014 10:14 am

How to applications-path

Post 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
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to applications-path

Post 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.
Use the source, Luke!
art-ganseforth
Earned some good credits
Earned some good credits
Posts: 147
Joined: Mon Sep 01, 2014 10:14 am

Re: How to applications-path

Post by art-ganseforth »

Thank you!
art-ganseforth
Earned some good credits
Earned some good credits
Posts: 147
Joined: Mon Sep 01, 2014 10:14 am

Re: How to applications-path

Post 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]);
       ...
}
Post Reply