CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    2

    HOW TO CHANGE THE FILTER IN A FILE OPEN MENU

    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


  2. #2
    Join Date
    Apr 1999
    Posts
    12

    Re: HOW TO CHANGE THE FILTER IN A FILE OPEN MENU

    Hi,

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



  3. #3
    Guest

    Re: HOW TO CHANGE THE FILTER IN A FILE OPEN MENU

    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());
    }

    }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured