I need to use Openfile dialog box and want to filter CSV files
starting with some specific alphabet, e.g.,"m
"-> m
yspecific.csv
How can I do it?
OPENFILENAME ofn;
ofn.lpstrFile[0] = '\0';
ofn.lpstrFilter = L"CSV Files (*.csv)\0*.csv\0All Files (*.*)\0*.*\0";// How to add "m" in filter and what is role of \0 here?
CodePudding user response:
You must put the letter before the star.
ofn.lpstrFilter = L"CSV Files (*.csv)\0m*.csv\0All Files (*.*)\0*.*\0";