资 源 简 介
用GDI函数抓屏
如果我们不太在意抓屏的效率,并且我们想要的只是一个屏幕快照的话,可以考虑使用GDI方式。这种抓屏机制是以“桌面也是一个窗口,桌面也有一个窗口句柄(HWND)”这个简单的常识为基础的,如果我们得到了桌面的设备上下文(DC),就可以利用blit(复制)它的内容到我们创建的DC中。我们可以用GetDeskWindow()得到桌面的窗口句柄,从句柄得到DC也是很容易的
-GDI function with screenshots screenshots if we do not care about efficiency, and we want only a snapshot of the screen, you can consider using GDI mode. This mechanism is based on the screenshots Desktop is also a window, the desktop also has a window handle (HWND) This simple knowledge-based, if we get the desktop device context (DC), can be used on the blit (copy) its contents that we created in DC. We can use GetDeskWindow () get desktop window handle from the handle to get DC is also very easy