CString filter;
filter = "??(*.??)|*.??||*.*";
CFileDialog dlg(TRUE,NULL,NULL,OFN_HIDEREADONLY,filter);
if(dlg.DoModal()==IDOK)
{
CString str = dlg.GetPathName();
CEdit *p_Edit = (CEdit*)GetDlgItem(IDC_EDIT??);
p_Edit ->SetWindowText(str);
}
你是不是要像这样的.
GetCurrentDirectory(MAX_PATH, m_szPath);用这个好了