有没有办法可以截被挡住了的窗口屏幕内容?郁闷ing...

解决方案 »

  1.   

    应该可能的(除非最小话了),ms的taskswitch.exe就可以的
      

  2.   

    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); 自己看一下CreateDC这个API函数的参数含义,改一下就行了