How to disable both the Recent and Frequent categories of a custom Jump List (ICustomDestinationList)

Nikita Provotorov 21 Reputation points
2020-10-23T04:10:49.93+00:00

Hello!
When I create instance of ICustomDestinationList , then start the Jump Lists's building session via ICustomDestinationList::BeginList, then DO NOT invoke ICustomDestinationList::AppendKnownCategory, then end the building session via ICustomDestinationList::CommitList, then invoke SHAddToRecentDocs, my custom Jump List still displays Recent category, but I didn't "turn on" it via ICustomDestinationList::AppendKnownCategory. Why? And is there a way to disable both Recent and Frequent categories?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,430 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Castorix31 81,831 Reputation points
    2020-10-23T05:56:12.82+00:00

    I cannot reproduce this problem with the MS SDK sample (does not call SHAddToRecentDocs):
    CustomJumpList

    Screencopy of the context menu (french) =>

    Custom-Jump-List-Sample.jpg

    0 comments No comments

  2. Nikita Provotorov 21 Reputation points
    2020-10-24T01:40:06.06+00:00

    Ok, looks like I discovered the next thing: if the Frequent and any custom categories aren't set then the Recent category is displayed despite it was not enabled explicitly (via ICustomDestinationList::AppendKnownCategory).

    IMHO if "it's not a bug, it's a feature" then such behavior should be explicitly described in the documentation because it's counter-intuitive I think.

    0 comments No comments

  3. Rita Han - MSFT 2,161 Reputation points
    2020-10-26T03:07:56.313+00:00

    Hello @Nikita Provotorov ,

    DO NOT invoke ICustomDestinationList::AppendKnownCategory, then end the building session via ICustomDestinationList::CommitList

    The Recent category will not displayed. You can confirm it via AutomaticJumpList sample with this line pcdl->AppendKnownCategory(fRecentSelected ? KDC_RECENT : KDC_FREQUENT); commented out.

    invoke SHAddToRecentDocs, my custom Jump List still displays Recent category

    This is expected because the SHAddToRecentDocs function adds a document to the shell's list of recently used documents. If you don't want Recent category don't call this function.

    Thank you!


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments