RE: Capturing the desktop image

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu