Prevent adding files to recent documents

100 Views Asked by At

I have an application using two diffent types of files. The 1st file type is a project file (called *.pcwex) and the 2nd file type is a library file (called *.pcwlx).
If I open a project file using the "File open" dialog (file extension *.pcwex), this file name should be added to the recent documents list of this application.
If I add a library to an open project, I use also the "File open" dialog (but with file extension *.pcwlx). But this library file should not be added to the recent file list, because it cannot be opened as a project.

I added to following entries to the registry:

[HKEY_CLASSES_ROOT\.pcwex]
@="PCWE.pcwex"

[HKEY_CLASSES_ROOT\.pcwex\OpenWithProgids]
"PCWE.pcwex"=""

[HKEY_CLASSES_ROOT\PCWE.pcwex]

[HKEY_CLASSES_ROOT\PCWE.pcwex\DefaultIcon]  
@="C:\\Program Files (x86)\\MyCompany\\MyApplication\\Application.ico"

[HKEY_CLASSES_ROOT\PCWE.pcwex\shell]

[HKEY_CLASSES_ROOT\PCWE.pcwex\shell\open]

[HKEY_CLASSES_ROOT\PCWE.pcwex\shell\open\command]  
@="C:\\Program Files (x86)\\MyCompany\\MyApplication\\MyApp.exe \"%1\""



[HKEY_CLASSES_ROOT\.pcwlx]  
@="PCWE.pcwlx"

[HKEY_CLASSES_ROOT\PCWE.pcwlx]

[HKEY_CLASSES_ROOT\PCWE.pcwlx\DefaultIcon]  
@="C:\\Program Files (x86)\\MyCompany\\MyApplication\\Application.ico"

With this configuration both file types (*.pcwex and *.pcwlx) are added to the recent documents list.

What is needed to add only files of type *.pcwex to the recent file list and ignore *,pcwlx file?

0

There are 0 best solutions below