LOCAL liGetDC, liDCHandle, liPlanes, liBitsPixel, liNumColors, ;
liStandardPlanes, liStandardBitsPixel, piDCHandle, piNumColors
DECLARE INTEGER GetDC IN WIN32API INTEGER liGetDC
liDCHandle = GetDC(0)
liStandardPlanes = 14
liStandardBitsPixel= 12
DECLARE INTEGER GetDeviceCaps IN WIN32API ;
INTEGER piDCHandle, INTEGER piNumColors
liPlanes = GetDeviceCaps(liDCHandle, liStandardPlanes)
liBitsPixel = GetDeviceCaps(liDCHandle, liStandardBitsPixel)
liNumColors = 2^(liPlanes * liBitsPixel)
DECLARE INTEGER ReleaseDC IN WIN32API ;
INTEGER piHandle, INTEGER piDCHandle
ReleaseDC(0, liDCHandle)
messagebox(TRANSFORM(liNumColors)+ " number of colors")