Click to See Complete Forum and Search --> : HOW TO CHANGE THE FILTER IN A FILE OPEN MENU


voyageur1
May 27th, 1999, 01:05 PM
I have a menu and when i click Open, the system gives me only the *.icf. But now I want ot had *.lbl to my filter ( *.icf; *.lbl on the same line)

How can i do that ?

Thank you

StéphaneDebono
May 31st, 1999, 07:44 AM
Hi,

Just Use a CFileDialog object
CFileDialog dlg(TRUE or FALSE, "abc", "*.abc");

May 31st, 1999, 10:34 AM
Please modify CWinApp::OnFileOpen()such as following:
{
CFileDialog dlg(TRUE,NULL,NULL,OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST|OFN_HIDEREADONLY,
_T("*.icf|*.icf|*.lbl|*.lbl|"),NULL);
if (dlg.DoModal()==IDOK)
{
OpenDocumentFile(dlg.GetPathName());
}

}