TCanvas *csBuf = new TCanvas;
HDC hDC = GetDC(cwb_Browser->Handle);
csBuf->Handle = hDC;
Graphics::TBitmap *CapImg = new Graphics::TBitmap();
CapImg->Width = cwb_Browser->Width;
CapImg->Height = cwb_Browser->Height;
CapImg->Canvas->CopyRect( Rect(0, 0, CapImg->Width, CapImg->Height),csBuf,
Rect(0, 0, cwb_Browser->Width ,cwb_Browser->Height));
img_Capture->Picture->Assign(CapImg);
img_Capture->Picture->SaveToFile("D:1.bmp");
ReleaseDC(0, hDC);
delete CapImg;

kenny23 發表在 痞客邦 PIXNET 留言(0) 人氣()