Select A Directory c++
On occasion a directory needs to be selected programmatically. The code snippet below offers sound solution. [codesyntax lang=”cpp”] std::string bcsGui::SelDir(string initDir) { string selDir; wxDirDialog dlg(NULL, “Choose input directory”, initDir, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST); if (dlg.ShowModal() == wxID_OK) { selDir = dlg.GetPath().ToStdString(); return selDir; } dlg.Destroy(); } [/codesyntax] Include the target class into the project. [codesyntax […]