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:

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.
You need to generate a Preview Handler for your file type.
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.
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.
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:
Using the Content View
For a general overview on the Content View, see this article:
Content View By File Type or Kind