如何调用通用对话框中保存的对话框

解决方案 »

  1.   

    CString Filename;
    CFileDialog dlg(FALSE);
    if(dlg.DoModal()==IDOK)
      Filename=dlg.GetFileName();
      

  2.   

    CFileDialog dlg(BOOL bVal)
    bVal=TRUE:打开
        =FALSE:保存
      

  3.   

    用GetSaveFileName()函数。The GetSaveFileName function creates a Save dialog box that lets the user specify the drive, directory, and name of a file to save. BOOL GetSaveFileName(
      LPOPENFILENAME lpofn   // initialization data
    );
    Parameters
    lpofn 
    [in/out] Pointer to an OPENFILENAME structure that contains information used to initialize the dialog box. When GetSaveFileName returns, this structure contains information about the user's file selection.