I have subclassed CFileDialog.
I need to select both file and folder on certain case only.
Suppose I have a folder selected and it is containing desired file type.
Then in such situation, On clicking open button will not open the selected folder. But just close the CFileDialog with IDOK.

For doing this I need to provide my own implementation for Open button handler. I am not getting how I can do this.

Any suggestion or advice will be greatly appreciated!