Capturing a Window

JChild 21 Reputation points

I am trying to capture an application's display and stream it to another computer. The application is composed of multiple program windows. I found the following examples and used them to create a window with a composition host that captures multiple windows and combines them into one window.

When I try to capture the new window I am only able to get the new window's background color. I have tried using GDI+ (StretchBlt and BitBlt) and DirectX but they are unable to capture the new window with the combined layers. They just capture the background of the new window. The code I am writing is on a stand alone network so I am unable to post the actual source code.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,481 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,601 questions
{count} votes

Accepted answer
  1. Castorix31 82,491 Reputation points

    I tested with HelloComposition sample, and I can copy the window with
    PrintWindow and PW_RENDERFULLCONTENT flag (into a compatible DC with CreateCompatibleDC)
    I added a SS_BITMAP Static control where I set the copied bitmap with STM_SETIMAGE :


    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful