Window Overlap Management
Because a DCI client can access multiple display surfaces at once, the DCI Manager provides a mechanism to combine all created surfaces into one displayable screen image. Because GDI is not aware of extended surfaces, the combination becomes problematic when windows containing data from an extended surface are overlapped by other windows.
The DCI Manager first notifies the DCI Provider about the rectangle size that the DCI client is writing to the surface through the Provider's SetDestination callback function. More work is needed when this screen area becomes overlapped by other windows. For this reason, any DCI Provider that supports offscreen surfaces must support window overlap management by using a DCI Manager provider Cliplist.
The Cliplist completely describes the rectangles to be copied from the offscreen surface to the screen. If the offscreen surface data is drawn to the screen through the use of the chroma-key the DCI Provider is responsible for painting the chroma-key data to the included rectangles when the SetCliplist callback is invoked.
Important Implementation Note If your provider allocates any memory with GlobalAlloc(), be sure to use the GMEM_SHARE flag. Otherwise problems will occur if two applications are both using your provider, because memory allocated in the context of the first application will be freed when it exits, even if the second application is still using your provider.