I am trying to capture an image using screengrabber
{ // Capture the window to a bitmap.COXScreenGrabber ScreenGrabber;
CWnd m_wndMDIClient;
m_wndMDIClient.Attach(theMainFrame->m_hWndMDIClient);
// Get the rectangle of the Graph area.
m_wndMDIClient.GetWindowRect(&rect);
// Get the rectangle of the frame.
theMainFrame->GetWindowRect(&botRect);
// extend our capture rectangle to the bottom of the frame.
rect.bottom=botRect.bottom;
ScreenGrabber.GrabRectangle(rect);
COXDIB* pDib = ScreenGrabber.GetGrabDIB();
m_wndMDIClient.Detach();
}
But this method does not work properly when the system is locked. The captured image is blank,if the system is locked.
Is there any other way i can get the screenshot and save it as jpeg