I\'ve got DirectShow based screen capture software. Internally it calls CopyScreenToBitmap function to grab screen. Then the picture is compressed by ffdshow. It works fine
Try this in addition to allowing access to the desktop:
Then get the DC of the desktop using one of a few methods, including
CreateDC(TEXT("DISPLAY"),NULL,NULL,NULL)
Good luck