See this recent question:
How can I take a screenshot of a single CWnd object?[
^]
The original poster posted his code for taking a screenshot of the entire screen.
That code will work to also take a screenshot of some smaller rectangle on the screen, if you change the width and height of the destination bitmap and the offset and width and height in the bitblt() call.