Quote Originally Posted by cilu
Now, there's a real bad news: if I derive CFileDialog I still have that problem:

Code:
CMyFileDialog : public CFileDialog
{
  // all the stuff
};
Code:
{
   CMyFileDialog *pFD = new CMyFileDialog( TRUE );
   pFD->DoModal();
   delete pFD;  // first-chance exception...
}
After you call DoModal, try calling other method - if it fails, you need to remove the 'delete'. WHY?

Well, that just a guess/suggestion - it may be that CFileDialog, when allocated in heap, might be calling "delete this" in it's PostNCDestroy. Just like Frame and Views - I know frame/views are always allocated in heap not in stack. But this may be the case...