We have a CVI 7 program that, for test purposes, needs to verify the color depth of the monitor that it runs on. It uses the following code:
int MonitorID = 0;
int ColorDepth = 0;
GetSystemAttribute (ATTR_PRIMARY_MONITOR, &MonitorID);
GetMonitorAttribute (MonitorID, ATTR_COLOR_DEPTH, &ColorDepth);
if (ColorDepth != 32)
{
if (!ConfirmPopup("Color Depth Mismatch", "Invalid color depth, Do you wish to continue?"))
return -1;
}
We've installed this program on multiple computers and it works as expected.
Some of us have recently upgraded to CVI 8. When we install any CVI 8 program on a computer that also contains the CVI 7 application mentioned above, that application begins reporting that the color depth is incorrect. Based on a quick test on one machine, the color depth returned by GetMonitorAttribute is now 0 instead of 32.
Apparently the CVI 8 installation is affecting the CVI 7 run-time engine in some way that causes the color depth to be incorrect.
Message Edited by Tony Gray on 11-30-2006 10:36 AM