Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3239934
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:01:39+00:00 2026-05-17T18:01:39+00:00

My development team are having a problem having snippets of text shown for search

  • 0

My development team are having a problem having snippets of text shown for search results in windows 7 for our own custom files (note we are NOT talking about the preview pane that uses the IPreviewHandler interface). An example of what I mean for .txt files is shown below:

Search example

The text snippet shown here with the highlighted result is not shown for our own files, only the name of the file is.

We have implemented an IFilter for our files and this is indexing the file contents correctly (searching returns the correct results). It just wont show the snippet and highlight the search term.

We suspected it might be something to do with the cwcStartSource, and cwcLenSource values for the STAT_CHUNK in IFilter, but setting these to different values has so far yielded nothing.

Has anyone else had a similar experience or have any thoughts?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:01:40+00:00Added an answer on May 17, 2026 at 6:01 pm

    You need to generate a Preview Handler for your file type.

    It can also render enhanced previews of items in a Preview Pane without launching the default application, if the application has registered a Preview Handler. This can provide functionality such as file type-specific navigation (such a browsing a presentation using next/previous controls, or seeking inside a media file).[29] Preview handlers can also allow certain kind of selections (such as highlighting a text snippet) to be performed from the preview pane itself.

    source

    There’s a bunch of code examples floating around for PDFs and such.

    Take a peek here: CodePlex:Windows Preview Handler Pack

    Edit:

    To clarify, the search results pane in Windows 7 is a preview handler host. It has two main pieces: the Content View and the Preview Pane.

    Windows Explorer also includes a view mode called the Content view, which is the default view when viewing search results. The Content view shows the name, location, some of the metadata tags associated with the file, a thumbnail image of the file, and a snippet of the file. This view mode also uses hit highlighting to show where the query term appears in the files, which makes it easy to understand why that file was returned in the search results list.

    source

    You need a Preview Handler for any custom file types if you want enhanced functionality like viewing the file contents for your custom file type.

    In Windows Vista and later, Windows Search is integrated into all Windows Explorer windows for instant access to search.

    …

    Preview handlers and thumbnail handlers enable users to preview documents in Windows Explorer without having to open the application that created them.

    source

    To verify that you have implemented your custom file type correctly, you can try the File Type Verifier from the Windows 7 SDK, which will test the following things assosicated with your custom file:

    • Preview Handlers
    • Thumbnail Handlers
    • Property Handlers
    • Verb Handlers
    • Filters (IFilter)
    • Kind Associations
    • Perceived Types
    • Important Properties

    Using the Content View

    you can take advantage of the Content
    view by using either of two different
    approaches. You can use an existing
    set of properties and layout pattern,
    or you can create your own
    combination. These two approaches are
    described in detail:

    • Associating Your File Type or Item
      with an Item Kind
    • Registering a
      Unique Content View Set of Properties
      and Layout Pattern for the File Type
      or Item

    For a general overview on the Content View, see this article:

    Content View By File Type or Kind

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our development team work with Borland C++ Builder 6 and CodeGear C++ Builder 2007
Our server operations team has asked the web development team (ASP.NET) to provide a
Recently, our development team was approached by a representative from one of the departments
Our shop is set up with a Team Foundation 2005 server but all development
My development team is using ASP.NET 3.5 / 4.0 right now, and our sites
My development team uses source safe at a very basic level. We're moving into
My development team is moving to branching soon - we've been cursed with SourceSafe
Say a development team includes (or makes use of) graphic artists who create all
Assume your .NET-based development team is already using the following set of tools in
Part of the development team I work with has been given the challenge of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.