GetThumbnailImage

獲得縮略圖;
Image *GetThumbnailImage(
UINT thumbWidth, //寬度(像素)
UINT thumbHeight, //高度(像素)
GetThumbnailImageAbort callback,
VOID *callbackData);
callback 可選。您提供的回調函式。在創建或檢索的縮略圖圖像處理,微軟Windows GDI +中調用該函式,讓您有機會中止這一進程。默認值是NULL。
callbackData 可選。指針指向的記憶體塊,它包含要由回調函式使用的數據。默認值是NULL
MSDN 例子
VOID Example_GetThumbnail(HDC hdc)
{
Graphics graphics(hdc);
// Create an image and a thumbnail of the image.
Image image(L"Crayons.jpg");
Image* pThumbnail = image.GetThumbnailImage(40, 40, NULL, NULL);
// Draw the original and the thumbnail images.
graphics.DrawImage(&image, 10, 10, image.GetWidth(), image.GetHeight());
graphics.DrawImage(
pThumbnail,
150,
10,
pThumbnail->GetWidth(),
pThumbnail->GetHeight());
delete pThumbnail;
}

相關詞條

熱門詞條

聯絡我們