直接上代码: wxString GetWorkDirectory( ) { wxString strAppPath ; wxStandardPathsBase& stdp = wxStandardPaths::Get(); wxFileName exeFile(stdp.GetExecutablePath()); strAppPath = exeFile.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR); return strAppPath ; }