CFileDialog problem

AcidGoat

Newcomer
Joined
Apr 26, 2005
Messages
3
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:

Code:
m_ofn.hInstance = AfxGetResourceHandle();

Here's the code I wrote to call the dialog:

Code:
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
 
Wow... apparently I'm really dumb. Please disregard my question. I realized I need to be using OpenFileDialog() instead of CFileDialog. Oops.
 
Back
Top