std::string FileDialogImpl::getFilename() const { return wideToString(std::wstring(m_fileDialogStruct->lpstrFile)); }
const char *wideToString(const wchar_t *s) { wstring buf = s; return wideToString(buf); }
const char *wideToString(const wchar_t *s, string &to) { wstring buf = s; return wideToString(buf, to); }
const char *wideToString(wstring &s) { return wideToString(s, w2st_buf); }