Thanks TSYS. It worked.

Now I have to go back in this 200 KLOC project and replace dozens of CFileDialog with CFileDialog*...