Description: 利用读文件的方式直接读取BMP方式。比普通方式更加简单,明了。-read documents using direct read BMP way. More than ordinary means simple, straightforward. Platform: |
Size: 1189888 |
Author:马木木 |
Hits:
Description: 其实原理就是捕获屏幕画面然后再把图像传给客户机。原理很简单:
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 Platform: |
Size: 2048 |
Author:xushuangjay |
Hits:
Description: VC++在BMP图片上显示文本,是一个VC++窗口绘图的例子,JPG格式图片未做测试。显示文字主要是使用TextOut方法,完整的过程是:定义位图对象,加载背景位图,获取位图信息(图像宽度和高度),获取窗口客户区域,获取窗口设备上下文,定义一个内存设备上下文,CreateCompatibleDC方法创建与pDC兼容的设备上下文,选中位图对象在窗口中绘图,设置透明的背景模式,输出文本-VC++ to display text on the BMP picture window is a VC++ examples of graphics, JPG format picture without making tests. The main display text using TextOut method, a complete process: define bitmap objects, load background bitmap, get bitmap information (image width and height), access to the client area of a window, the window to get the device context, the definition of a memory device context, CreateCompatibleDC way to create a compatible device context pDC, select the bitmap object in the drawing window, set transparent background mode, the output text Platform: |
Size: 328704 |
Author:apudn83 |
Hits: