FUNCTION NumColors * 32 bit version for use with * VFP under Win 95 and above, * and Win NT 3.51 and above DECLARE INTEGER GetDC IN Win32API; INTEGER hWnd DECLARE INTEGER GetDeviceCaps IN Win32API; INTEGER hDC, INTEGER nIndex DECLARE INTEGER ReleaseDC IN Win32API; INTEGER hWnd, INTEGER hDC LOCAL lnresult, lnhDC, lnplanes, lnpixels lnresult = 0 lnhDC = GetDC(0) IF lnhDC > 0 * Get the number of color planes lnplanes = GetDeviceCaps(lnhDC, 14) * Get the number of bits per pixel lnpixels = GetDeviceCaps(lnhDC, 12) * Calculate the return value lnresult = 2 ^ (lnplanes * lnpixels) = ReleaseDC(0, lnhDC) ENDIF RETURN lnresult