MFC浏览文件

void CMFC_testDlg::OnBrowse()
{
 // TODO: Add your control notification handler code here
 CFileDialog dlg(TRUE,NULL,NULL,OFN_HIDEREADONLY,"All Files(*.*)|*.*||",AfxGetMainWnd());
    if (dlg.DoModal()==IDOK)
 {
  pathname=dlg.GetPathName();
  GetDlgItem(IDC_EDIT_FileAddress)->SetWindowText(pathname);
 }
}

你可能感兴趣的:(null,mfc)