RE: Capturing the desktop image
- Posted by Bernie Ryan <xotron at localnet.com> Aug 22, 2001
- 351 views
Chris Bensler wrote: > My main problem is getting the pixel data from the compatibleDC.. > If anyone's familiar with Exotica.. you could understand what I'm trying > to > do.. > I want to get the dektop image so I can simulate a non-fullscreen > window/s Chris: Did you try: create a RECT structure. Desk_handle = GetDeskTop() GetClientArea(Desk_handle, address_of_RECT) Then: DC = GetDC( hWnd ) hMemDC = CreateCompatibleDC( hDC ) hBckgrdBitmap = CreateCompatibleBitmap( hDC, rect.right, rect.bottom ) SelectObject( hMemDC, hBckgrdBitmap ) BitBlt( hMemDC, 0, 0, rect.right, rect.bottom, hDC, 0, 0, SRCCOPY ) DeleteDC( hMemDC ) ReleaseDC( hWnd, hDC ) Bernie