获得当前颜色深度

function GetColorDepth: integer 
var 
  dc: HDC; 
begin 
  dc := GetDC(0); 
  Result := GetDeviceCaps(dc, BITSPIXEL); 
  ReleaseDC(0, dc); 
end;

原文地址:https://www.cnblogs.com/yzryc/p/6374133.html