CreateThumbnailFromFile example for C++ 5.0 and later
void CTutorDlg::OnButton1()
{
m_pRasterThumbnail->PutLoadStamp(FALSE);
m_pRasterThumbnail->PutForceSize(TRUE);
m_pRasterThumbnail->PutThumbnailBackgroundColor(RGB(0,255,0));
m_pRasterThumbnail->PutThumbnailWidth(80);
m_pRasterThumbnail->PutThumbnailHeight(40);
m_pRasterThumbnail->CreateThumbnailFromFile("c:\\temp\\testdb6.tif", 1);
m_pRasterThumbnail->CreateThumbnailFromFile("c:\\temp\\testdb6.tif", 2);
m_pRasterThumbnail->CreateThumbnailFromFile("c:\\temp\\testdb6.tif", 3);
}
void CRasterThumbnailSink::OnThumbnailEvent(long Bitmap, char * pszFilename, short StatusCode, short nPercent)
{
if((StatusCode == 0) && (nPercent == 0) && (Bitmap != 0))
{
AfxMessageBox(pszFilename);
}
}