Yeah. It's a bug in Windows, brought out by declaring WINVER equal to or greater than 500. I've had the same problem in VC++ 6.0.

You can get around it by declaring your CFileDialog object on the stack, eg.:
Code:
{
   CFileDialog *pFD = new CFileDialog( TRUE );
   pFD->DoModal();
  // etc.
  // etc.
  delete pFD;
}