[WIN32K]
[reactos.git] / reactos / win32ss / user / ntuser / clipboard.c
index 4bbbb74..60c355b 100644 (file)
@@ -173,7 +173,7 @@ IntSynthesizeDib(PWINSTATION_OBJECT pWinStaObj, HBITMAP hBm)
     {
         pMemObj->cbData = sizeof(BITMAPINFOHEADER) + bi.bmiHeader.biSizeImage;
         memcpy(pMemObj->Data, &bi, sizeof(BITMAPINFOHEADER));
-        NtGdiGetDIBitsInternal(hdc, pMemObj->Data, 0, bm.bmHeight, (LPBYTE)pMemObj->Data + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
+        NtGdiGetDIBitsInternal(hdc, hBm, 0, bm.bmHeight, (LPBYTE)pMemObj->Data + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
         IntAddFormatedData(pWinStaObj, CF_DIB, hMem, TRUE, TRUE);
     }
 
@@ -225,6 +225,7 @@ IntSynthesizeBitmap(PWINSTATION_OBJECT pWinStaObj, PCLIP pBmEl)
                                     pConvertedBmi,
                                     DIB_RGB_COLORS,
                                     0,
+                                    pMemObj->cbData - Offset,
                                     0);
 
     if (hBm)
@@ -478,7 +479,7 @@ BOOL APIENTRY
 NtUserCloseClipboard(VOID)
 {
     BOOL bRet;
-    
+
     UserEnterExclusive();
     bRet = UserCloseClipboard();
     UserLeave();
@@ -714,7 +715,7 @@ NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
     pWinStaObj = IntGetWinStaForCbAccess();
     if (!pWinStaObj)
         goto cleanup;
-    
+
     if (pWinStaObj->pClipBase == NULL)
     {
         iRet = 0;
@@ -1002,7 +1003,7 @@ NtUserSetClipboardViewer(HWND hWndNewViewer)
 cleanup:
     if(pWinStaObj)
         ObDereferenceObject(pWinStaObj);
-    
+
     UserLeave();
 
     return hWndNext;