http://www.csdn.net/Expert/topic/491/491272.shtm .

workhardfu 2002-01-22 04:51:29
http://www.csdn.net/Expert/topic/491/491272.shtm
...全文
37 1 点赞 打赏 收藏 举报
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
superaf 2002-01-22
void ComGetScreenServ::SnapScreen()
{
RECT r;
GetWindowRect(GetDesktopWindow( ),&r);
TCanvas *Canvas0=new TCanvas;
Canvas0->Handle=GetDC(0);
Graphics::TBitmap *bitmap=new Graphics::TBitmap( );
bitmap->Height=r.bottom;
bitmap->Width=r.right;
bitmap->Canvas->CopyRect(r,Canvas0,r);
delete Canvas0;
TJPEGImage* Screen = new TJPEGImage();
Screen->CompressionQuality=50; // 失真度
Screen->Assign(bitmap);
delete bitmap;
Screen->SaveToStream(JpegStream);
JpegStream->Position = 0;
delete Screen;
}
  • 打赏
  • 举报
回复
相关推荐
发帖
C++ Builder
创建于2007-08-02

1.3w+

社区成员

C++ Builder相关内容讨论区
申请成为版主
帖子事件
创建了帖子
2002-01-22 04:51
社区公告
暂无公告