Straight from the SDK sample Switcher:
if (hdc = CreateDC (TEXT("DISPLAY"), NULL, NULL, NULL))
{
// Copy the desktop to a memory DC
int xSize = GetSystemMetrics(SM_CXSCREEN);
int ySize = GetSystemMetrics(SM_CYSCREEN);
StretchBlt(memDC, 0, 0, destW, destH,
hdc, 0, 0, xSize, ySize, SRCCOPY);
DeleteDC(hdc);
}