This is given in the CFileDialog option.
Try using this and look if it solvs ur requirement. U can change the options and use the code as per requirements.
CFileDialog mydialog( FALSE,".txt", NULL,
OFN_OVERWRITEPROMPT |OFN_EXTENSIONDIFFERENT |OFN_LONGNAMES|OFN_NOCHANGEDIR,
"Text File (*.txt)|*.txt|Estimate Files (*.det)|*.det|Report Files (*.rep)|*.rep|All (*.*)|*.*||",NULL);
Bye
Jitu