You could try something like this, don't know if this actually works or not, didn't try it, but it can be a starting point for you, good luck:
CDC ScreenDC;
ScreenDC.Attach(::GetDC(NULL));
CBitmap Capture;
CSize Dimensions(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
Capture.CreateCompatibleBitmap(&ScreenDC, Dimensions.cx, Dimensions.cy);
CDC MemDC;
MemDC.CreateCompatibleDC(&ScreenDC);
CBitmap *OldBitmap = MemDC.SelectObject(&Capture);
MemDC.BitBlt(0, 0, Dimensions.cx, Dimensions.cy, &ScreenDC, 0, 0, SRCCOPY);
MemDC.SelectObject(OldBitmap);
MemDC.DeleteDC();
::ReleaseDC(NULL, ScreenDC.Detach());
//At this point the bitmap 'Capture' should contain an image of the desktop
> The problem with computers is that they do what you tell them to do and not what you want them to do. <