---
title: "获取当前路径"
author: "dqifa"
date: "2014-03-09T16:51:54Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2014-03-09T16:51:54Z"
id: 2028558
url: "https://emonkey.iteye.com/blog/2028558"
---

#include &lt;wx/stdpaths.h&gt;  
#include &lt;wx/filename.h&gt;

wxString GetWorkDirectory( )  
{  
 wxString strAppPath ;  
 wxStandardPathsBase& stdp = wxStandardPaths::Get();  
 wxFileName exeFile(stdp.GetExecutablePath());  
 strAppPath = exeFile.GetPath(wxPATH\_GET\_VOLUME | wxPATH\_GET\_SEPARATOR);

 return strAppPath ;  
}