Home > Software engineering >  CFileDialog suffix not. LNK file filtering not to come out!
CFileDialog suffix not. LNK file filtering not to come out!

Time:11-21

Cstrings strPath;
//CFileDialog hFileDlg (TRUE, NULL, NULL, OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_READONLY,
//TEXT (" executable Files (*. Exe) | *. Exe | *. LNK | All Files (*. *) | *. * | | "), NULL);
CFileDialog hFileDlg (TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_READONLY,
The TEXT (" LNK Files (*. LNK) | *. LNK | executable Files (*. Exe) | *. Exe | All Files (*. *) | *. * | | "), NULL);
HFileDlg. M_ofn. NFilterIndex=1;
HFileDlg. M_ofn. HwndOwner=m_hWnd;
HFileDlg. M_ofn. LStructSize=sizeof (OPENFILENAME);
HFileDlg. M_ofn. LpstrTitle=TEXT (" open file... \ 0 ");



The above code, CFileDialog suffixes not. LNK file filtering not to come out, how be to return a responsibility?

CodePudding user response:

DlgFile. M_ofn. LpstrFilter="Exefile (*. Exe) \ 0 *. Exe \ 0 lnkfile (*. LNK) \ 0 *. LNK \ 0 any file (*. *) \ 0 *. * \ 0";

CodePudding user response:



The file type has three lines!

CodePudding user response:

I use you can filter out the code, how to filter out

CodePudding user response:

Eh, you the problem of computer privileges!

CodePudding user response:

There are three lines, but I can't, or don't show LNK file,
Schlafenhamster,

CodePudding user response:

Don't show the LNK file
In the current directory must have first, LNK file

CodePudding user response:

In addition to choose in the file type. LNK file
  • Related