文件名称:pingmujiequ
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.77kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
其实原理就是捕获屏幕画面然后再把图像传给客户机。原理很简单:
1、先利用hdc=GetWindowDC(NULL) 得到桌面的hdc
2、memhdc=CreateCompatibleDC(hdc) 根据桌面的hdc创建一个和屏幕相同的内存DC
3、StretchBlt(memhdc,0, 0, nWid,nHei, hdc, 0, 0,nWid,nHei, SRCCOPY) ,把屏幕的图像复制到内存DC这时你已经在内存中得到了屏幕的图像了。这是设备相关的DDB图像,如果希望转换成设备无关的DIB图像,只要在DDB图像前创建一个标准的BITMAP文件头就可以了(DDBtoDIB( bitmap, BI_RGB, pal ))。
4、得到图像数据(如果考虑速度的话可以把图像压缩)
5、数据传输(远程监控)
“在这里,我们先来看看截获当前桌面是如何实现的。关于远程捕获,只要在下面的基础上加上网络传输部分就OK了。下面介绍的是捕获桌面技术的基础,具体截屏代码如下:
-In principle is to capture screen picture then pictures to the client. Principle is very simple:
1, first using HDC detected by FCM (NULL) GetWindowDC = Get the desktop HDC detected by FCM
2, memhdc = CreateCompatibleDC (HDC detected by FCM), According to the desktop HDC detected by FCM create a same memory DC and screen
3 and StretchBlt (0, 0, memhdc, nWid, nHei, 0, 0, HDC detected by FCM, nWid, nHei SRCCOPY) , The screen, the image to the memory when you are already in memory DC got screen image. This is related to the equipment, if hope DDB image converted image of device-independent DIB in DDB images, before creating a BITMAP standard file header can (DDBtoDIB BITMAP, Pal, BI_RGB ().
4 and image data (if consider speed can put the image compression)
5 and data transmission (remote monitoring)
"Here, we ll look at how the desktop is intercepted. About remote capture, just below the basis and network transmission parts with respect to OK. Here is the foundation, the desktop
1、先利用hdc=GetWindowDC(NULL) 得到桌面的hdc
2、memhdc=CreateCompatibleDC(hdc) 根据桌面的hdc创建一个和屏幕相同的内存DC
3、StretchBlt(memhdc,0, 0, nWid,nHei, hdc, 0, 0,nWid,nHei, SRCCOPY) ,把屏幕的图像复制到内存DC这时你已经在内存中得到了屏幕的图像了。这是设备相关的DDB图像,如果希望转换成设备无关的DIB图像,只要在DDB图像前创建一个标准的BITMAP文件头就可以了(DDBtoDIB( bitmap, BI_RGB, pal ))。
4、得到图像数据(如果考虑速度的话可以把图像压缩)
5、数据传输(远程监控)
“在这里,我们先来看看截获当前桌面是如何实现的。关于远程捕获,只要在下面的基础上加上网络传输部分就OK了。下面介绍的是捕获桌面技术的基础,具体截屏代码如下:
-In principle is to capture screen picture then pictures to the client. Principle is very simple:
1, first using HDC detected by FCM (NULL) GetWindowDC = Get the desktop HDC detected by FCM
2, memhdc = CreateCompatibleDC (HDC detected by FCM), According to the desktop HDC detected by FCM create a same memory DC and screen
3 and StretchBlt (0, 0, memhdc, nWid, nHei, 0, 0, HDC detected by FCM, nWid, nHei SRCCOPY) , The screen, the image to the memory when you are already in memory DC got screen image. This is related to the equipment, if hope DDB image converted image of device-independent DIB in DDB images, before creating a BITMAP standard file header can (DDBtoDIB BITMAP, Pal, BI_RGB ().
4 and image data (if consider speed can put the image compression)
5 and data transmission (remote monitoring)
"Here, we ll look at how the desktop is intercepted. About remote capture, just below the basis and network transmission parts with respect to OK. Here is the foundation, the desktop
(系统自动生成,下载前可以参看下载内容)
下载文件列表
屏幕截取.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.