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!

How can I access CFileDialog in MFC 1

Status
Not open for further replies.

jvff

Programmer
Apr 1, 2001
64
BR
How can I access CFileDialog in MFC? Can somebody send me a source-code example, please? ThanQ. ;-) Thank you,

JVFF (Janito Vaqueiro Ferreira Filho)
 
This shows the file open dialog:


char buff[2048] = "";
char filter[] = "All Files (*.*)|*.*|Text Files (*.txt)|*.txt||";
CFileDialog dlg(true, NULL, NULL, OFN_HIDEREADONLY, filter);
dlg.m_ofn.lpstrFile = buff;
dlg.m_ofn.nMaxFile = sizeof(buff);

dlg.DoModal(); :) Hope that this helped! ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top