Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFileDialog: selecting file type?!? 1

Status
Not open for further replies.

scienzia

Programmer
Feb 21, 2002
160
0
0
IT
I want to open an open file dialog with CFileDialog, but I would like it to show only txt files.

How do I do this???????????

Thanks
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top