Click to See Complete Forum and Search --> : OPENFILENAME lpstrFilter


JohnS9051
October 23rd, 1999, 12:01 AM
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 (*.*)||;

October 23rd, 1999, 07:39 AM
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"

JohnS9051
October 23rd, 1999, 06:21 PM
Thanks!