Stimmt, siehe Dokumentation:
Zitat von
[url=http://msdn.microsoft.com/en-us/library/dd144947.aspx:
Dokumentation[/
url]]After painting is complete, the ReleaseDC function must be called to release the device context. Not releasing the window device context has serious effects on painting requested by applications.
Delphi-Quellcode:
function DesktopColor(const x,y: integer): TColor;
var
DesktopDC: HDC;
begin
DesktopDC := GetWindowDC(GetDesktopWindow);
Result := GetPixel(DesktopDC, x, y);
ReleaseDC(DesktopDC);
end;