Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Screen shot

$
0
0

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


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>