如题,我新建了一个MFC基于Dialog的工程,在Toolbox里面找不到OpenFileDialog啊,怎么办?

解决方案 »

  1.   

    MFC没有这个控件的,添加一个按钮,然后在按钮的点击事件中添加
    CFileDialog dlg(TRUE);
    dlg.DoModal();
    不懂的话上网上查一下CFileDialog的用法.
      

  2.   

    有一个类CFileDialog作用是一样的。
      

  3.   

    CFileDialog就可以实现功能,所以一般不会去用控件。
    控件也有,是ActiveX,可以加载进来,通用对话框控件,Microsoft Comm Dialog Control
      

  4.   

    CFileDialog::CFileDialog
    Call this member function to construct a standard Windows file dialog box-object. Either a Open or Save As dialog box is constructed, depending on the value of bOpenFileDialog.
    CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL );