Thread: CFileDialog Assertion Error

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    7

    CFileDialog Assertion Error

    Hello all, I am writing a program that is using a modeless dialog for the gui. MFC is used as a shared dll and when i create a CFileDialog I get a Debug Assertion Error, can anyone help me? Here is the Code:

    Code:
    case ID_LOADPROXIES:
    	{
    		CFileDialog dlg(TRUE,"*.txt",NULL,OFN_EXPLORER|OFN_FILEMUSTEXIST,"Txt files (*.txt)|*.txt|");
    			if(dlg.DoModal() == IDOK){
    				std::string s;
    					s.append(dlg.GetFolderPath());
    				s.append(dlg.GetFileName());
    					MessageBox(NULL, NULL, s.c_str(), MB_OK);
    			}
    	}
    break;
    As soon as the button is pressed the error happens, Any ideas?

  2. #2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 04:35 PM
  4. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  5. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM