Based on this article :
I use this code to do some animation for a given Window Handle, doing some work in my database:
while not Terminated do
begin
DC := GetDC(FWnd);
if DC <> 0 then
try
BitBlt(DC,
FPaintRect.Left,
FPaintRect.Top,
ImageRect.Right,
ImageRect.Bottom,
Bitmap.Canvas.handle,
0, 0,
SRCCOPY);
finally
ReleaseDC(FWnd, DC);
end;
end;
Is it thread safe, or should I somehow block the DC?
Also, can I use GetDCEx? Thank.
kobik source
share