CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 1999
    Location
    Philadelphia area, Pennsylvania, USA
    Posts
    34

    OPENFILENAME lpstrFilter

    What is the correct syntax for the lpstrFilter display strings and filter patterns when using multiple display strings and multiple filter patterns.
    example:
    CString str = "PS Font files (*.pfm;*.pfb)| Windows Font files (*.fon;*.ttf)|All files (*.*)||;


  2. #2
    Guest

    Re: OPENFILENAME lpstrFilter

    For OPENFILENAME, the string must be terminated by '\0's and not '|'. Using '|' is a CFileDialog only thing (it converts all the '|'s to '\0');
    So a filter would be "Text Files\0*.txt\0All Files\0*.*\0\0"


  3. #3
    Join Date
    Sep 1999
    Location
    Philadelphia area, Pennsylvania, USA
    Posts
    34

    Re: OPENFILENAME lpstrFilter

    Thanks!


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