Copying a Screen Area

This topic provides an example that shows how to use CBitmapContext::CopyRect() to copy from one screen area to another.

...
TPoint screenOrigin(0,0); // top left of the screen
TSize area1(100,100); // size of area to copy
rect.SetRect(screenOrigin,area1); // set rectangle to copy
TPoint offset(area1.iWidth,0); // target area to right of copied area
gc.CopyRect(offset,rect); // copy rect to target
...