谁懂抓屏问题呀
给小弟指点指点
很急呀

解决方案 »

  1.   

    在www.vckbase.com中有你要的答案。
    类似QQ截屏。
    你搜索下“QQ”,就可以找到了。
      

  2.   

    一般截屏,google下一大把
    如果要截播放器 游戏等使用了硬件加速的内容,有点麻烦
      

  3.   

    下面是MSDN中的一段代码:// Create a normal DC and a memory DC for the entire screen. The 
    // normal DC provides a "snapshot" of the screen contents. The 
    // memory DC keeps a copy of this "snapshot" in the associated 
    // bitmap. 
     
    hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL); 
    hdcCompatible = CreateCompatibleDC(hdcScreen); 
     
    // Create a compatible bitmap for hdcScreen. 
     
    hbmScreen = CreateCompatibleBitmap(hdcScreen, 
                         GetDeviceCaps(hdcScreen, HORZRES), 
                         GetDeviceCaps(hdcScreen, VERTRES)); 
     
    if (hbmScreen == 0) 
        errhandler("hbmScreen", hwnd); 
     
    // Select the bitmaps into the compatible DC. 
     
    if (!SelectObject(hdcCompatible, hbmScreen)) 
        errhandler("Compatible Bitmap Selection", hwnd); 
     
            // Hide the application window. 
     
            ShowWindow(hwnd, SW_HIDE); 
     
             //Copy color data for the entire display into a 
             //bitmap that is selected into a compatible DC. 
     
            if (!BitBlt(hdcCompatible, 
                   0,0, 
                   bmp.bmWidth, bmp.bmHeight, 
                   hdcScreen, 
                   0,0, 
                   SRCCOPY)) 
     
            errhandler("Screen to Compat Blt Failed", hwnd); 
     
            // Redraw the application window. 
     
            ShowWindow(hwnd, SW_SHOW); 
      

  4.   

    http://www.codeproject.com/KB/graphics/screen_capturing.aspx
      

  5.   

    我想做一个抓屏后然后再传输过去
    现在我已经实现jpg图片的传输了不过抓屏怎么和它连在一起呀
    有没有代码呀
      

  6.   

    使用GDI+将位图转化成JPG:
    向MFC中增加ATL静态链接
    #include "atlimage.h"
    //以下是屏幕的截图
    CDC   dc;   
    dc.CreateDC(_T("DISPLAY"),NULL,NULL,NULL);   
    CBitmap   bm;   
    int   Width=GetSystemMetrics(SM_CXSCREEN);   
    int   Height=GetSystemMetrics(SM_CYSCREEN);   
    bm.CreateCompatibleBitmap(&dc,Width,Height);   
    CDC   tdc;   
    tdc.CreateCompatibleDC(&dc);   
    CBitmap* pOld=tdc.SelectObject(&bm);   
    tdc.BitBlt(0,0,Width,Height,&dc,0,0,SRCCOPY);   
    tdc.SelectObject(pOld); 
    //以下是JPG图片的保存 
    CImage image;
    image.Attach(bm);
    image.Save(_T("C:\\My.bmp"),Gdiplus::ImageFormatJPEG);
    //然后调用CImage的Load方法把JPG读取出来