AcidGoat Posted April 26, 2005 Posted April 26, 2005 Hi everyone, I've been trying to get the CFileDialog to work. It compiles fine, but any time the function runs to open the dialog, I get an error with Abort, Retry, Ignore errors. If I push Retry the dialog works fine. If I push Retry it debugs and points to this line in dlgfile.cpp: m_ofn.hInstance = AfxGetResourceHandle(); Here's the code I wrote to call the dialog: CFileDialog openIt(TRUE, ".txt", NULL, 0, "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||"); openIt.DoModal(); I can't figure out what's going on... any ideas? Thanks in advance, --Brad Quote
Leaders snarfblam Posted April 27, 2005 Leaders Posted April 27, 2005 CFileDialog? Are you using Windows Forms or MFC? Quote [sIGPIC]e[/sIGPIC]
AcidGoat Posted April 27, 2005 Author Posted April 27, 2005 CFileDialog? Are you using Windows Forms or MFC? I'm using Windows Forms Quote
AcidGoat Posted April 27, 2005 Author Posted April 27, 2005 Wow... apparently I'm really dumb. Please disregard my question. I realized I need to be using OpenFileDialog() instead of CFileDialog. Oops. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.