IsGrayscale example for C++ 5.0 and later
GrayscaleTypes IsGray;
IsGray = (GrayscaleTypes)m_LEADRasterView1.GetRaster().GetIsGrayscale ();
if(IsGray == GRAY_NO)
AfxMessageBox(TEXT("Not Grayscale"));
else
AfxMessageBox(TEXT("Is Grayscale"));