I came across this since you mentioned my blog (codemonkeycodes.com).
What is your problem with my sample? Have you registered the dll using regsvr32? What version of Windows 7 are you using, 32 or 64?
Update:
I can not say what is for you or does not work. I just downloaded the sample from my site, followed the directions and changed the function STDMETHODIMP CThumbnailProvider :: GetThumbnail ... to look like
{ *phbmp = NULL; *pdwAlpha = WTSAT_UNKNOWN; ULONG_PTR token; GdiplusStartupInput input; if (Ok == GdiplusStartup(&token, &input, NULL)) { //gcImage.LogBuffer(); Bitmap * pBitmap = new Bitmap(188, 141); if( pBitmap ) { Color color(0, 0, 0); pBitmap->GetHBITMAP(color, phbmp); } } GdiplusShutdown(token); if( *phbmp != NULL ) return NOERROR; return E_NOTIMPL; }
I registered the DLL and then created a new file with the corresponding extension, and tada, I had a beautiful black sketch.
I wish I could help you. Maybe you want to write me your code?
source share