Described is the selective exclusion of content returned in a requested
screen capture operation, wherein exclusion may be determined by a window
category and the requesting application program. For example, a
magnification program will not received content captured from its own
layered window or from any other layered magnification windows. A
registration mechanism obtains and maintains a window handle for any
window registered for exclusion. A screen capture mechanism uses the
information to determine whether to exclude the content of windows when
returning the captured screen content. Exclusion may be accomplished by
enumerating areas that are not covered by any layered window and copying
those areas to a screen representation buffer or the like, and separately
enumerating areas that are covered by at least one layered window. A
covered area is only copied to the screen representation when it does not
correspond to an excluded window.