Problems with CFileDialog instantiation

前端 未结 2 2239
感动是毒
感动是毒 2021-01-13 22:44

I\'m following the definition for CFileDialog, yet VS2013 is still telling me that there is no constructor available for the arguments that I\'m passing in.

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-13 23:25

    Ok. So I've changed my code to the following:

    CFile theFile;
    TCHAR strFilter[] = { _T("TXT Files (*.txt)|*.txt|All Files (*.*)|*.*||") };
    CFileDialog fDlg = CFileDialog(TRUE, _T(".txt"), NULL, 0, strFilter);
    

    And, there are now no problems. Thank you for your responses!

提交回复
热议问题