It sounds like your trying achieve the same effect as this question:
Coerce Windows to show a thumbnail for my custom file type
And here is a direct link on how to do it (with examples in c++):
http://msdn.microsoft.com/en-us/library/cc144067%28VS.85%29.aspx