c# - Why do only files with my file extension show up in the Windows 7 jump list? -


I'm trying to integrate my app properly with Windows 7 Jump Lists. We allow the files to open within the application and I add items to the jump list before a while ago:

  on List = JumpList.CreateJumpList () list.AddToRecent (file); List.Refresh ();   

Where is the JumpList

There were two issues with this approach

  1. Sometimes those calls (will get a ComException on the refresh) (Will be changed unable to extract file (Exception from HRESULT: 0x80070497)).
  2. Only files in the JumpList can have files with file extensions.

    We allow the import of other files in our application through the Open method and I want to show these files in the Jump List but they ' T

    I have searched through the questions about the JumpLists here and found a different way to add recently used files to this:

    Zero AddFileToRecentFilesList (string fileName) {SHAddToRecentDocs ((UIT) ShelladRentDOCS SH ARD_PATHW, filename); } /// & lt; Summary & gt; /// The original call to connect the file to the recent file list of windows /// & lt; / Summary & gt; /// & lt; Ultimate name = "uFlags" & gt; Always use (UIT) ShellAddRecentDocs.SHARD_PATHW & lt; / Param & gt; /// & lt; Param name = "pv" & gt; Path to file & lt; / Param & gt; [DllImport ("shell32.dll")] public static extern zero SHAddToRecentDocs (UInt32 uFlags, [MarshalAs (UnmanagedType.LPWStr)] string PV; Enum ShellAddRecentDocs {SHARD_PIDL = 0x00000001, SHARD_PATH = 0x00000002, SHARD_PATHW = 0x00000003}

    It seemed more suitable as it is also backwards compatible with XP, Vista - the problem is that JumpList There are still only files with my associated file extension.

    I have two questions:

    1. What's the best way to add items to the jump list.
    2. How do I get any files to show in my Jump List regardless of file extension?

      to:

      An application of that type There should be a registered handler for a file type for an item, though it does not need to be a default handler for that file type to appear in its Jump List

      Or perhaps by adding an action, registering itself with any type of file type will simply register your ProgId or OpenWithProgIds or OpenWithList Exe name (HKCR \%. Ext% \ OpenWithProgIds)

      Facts require windows that it is a little stupid IMHO, but I think they know how to pass when you have a jump list If you click on the item, then your app's file path.

      SHAddToRecentDocs has more than the parameter type you have listed, it is not said for docs that you need to register for it anywhere. You can try that a basic path Instead of adding ...

Comments