//获取当前路径
    CString strCurrentPath;
    GetCurrentDirectory(200, strCurrentPath.GetBuffer(200));
    strCurrentPath.ReleaseBuffer();    //m_EditHouseName.GetWindowText();
    static char sfile[] = "Excel文件(*.xls)|*.xls|记事本文件(*.txt)|*.txt||";
    CString filename;
    CFileDialog fileDlg(FALSE, "xls", "HouseInfo.xls", OFN_OVERWRITEPROMPT, sfile, this);    fileDlg.m_ofn.lpstrInitialDir = strCurrentPath; /// 这里就设置了对话框的默认目录为strCurrentPath
    if (IDOK == fileDlg.DoModal())
    {
        filename = fileDlg.GetPathName();
        MessageBox(filename);
        //saveExcel(filename);
    }