mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 18:00:37 +01:00
parent
6d408b4534
commit
9824f1f124
@ -1922,7 +1922,7 @@ begin
|
|||||||
BitmapInfo.bmiHeader.biCompression := BI_RGB;
|
BitmapInfo.bmiHeader.biCompression := BI_RGB;
|
||||||
{BitmapInfo.bmiHeader.biSizeImage := 0;}
|
{BitmapInfo.bmiHeader.biSizeImage := 0;}
|
||||||
|
|
||||||
hScreenDC := Windows.GetDC(0);
|
hScreenDC := Windows.GetDC(Windows.GetDesktopWindow);
|
||||||
MaskBitmap := 0;
|
MaskBitmap := 0;
|
||||||
Bitmap := Windows.CreateDIBitmap(hScreenDC, Windows.TBitmapInfoHeader(BitmapInfo.bmiHeader),
|
Bitmap := Windows.CreateDIBitmap(hScreenDC, Windows.TBitmapInfoHeader(BitmapInfo.bmiHeader),
|
||||||
CBM_INIT, RawImage.Data, Windows.TBitmapInfo(BitmapInfo), DIB_RGB_COLORS);
|
CBM_INIT, RawImage.Data, Windows.TBitmapInfo(BitmapInfo), DIB_RGB_COLORS);
|
||||||
@ -1939,14 +1939,14 @@ begin
|
|||||||
if Result then
|
if Result then
|
||||||
begin
|
begin
|
||||||
BitmapInfo.bmiHeader.biBitCount := 1;
|
BitmapInfo.bmiHeader.biBitCount := 1;
|
||||||
Result := Windows.SetDIBits(0, MaskBitmap, 0, RawImage.Description.Height,
|
Result := Windows.SetDIBits(hScreenDC, MaskBitmap, 0, RawImage.Description.Height,
|
||||||
RawImage.Mask, Windows.TBitmapInfo(BitmapInfo), DIB_RGB_COLORS)
|
RawImage.Mask, Windows.TBitmapInfo(BitmapInfo), DIB_RGB_COLORS)
|
||||||
= LongInt(RawImage.Description.Height);
|
= LongInt(RawImage.Description.Height);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Windows.ReleaseDC(0, hScreenDC);
|
Windows.ReleaseDC(Windows.GetDesktopWindow, hScreenDC);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWin32WidgetSet.CreateDIBSection(DC: HDC; const p2: tagBitmapInfo; p3: UINT;
|
function TWin32WidgetSet.CreateDIBSection(DC: HDC; const p2: tagBitmapInfo; p3: UINT;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user