CountLUTColors example for C++ 5 and later
Cstring strMsg;
m_LeadRasterView.GetRaster ().CountLUTColors( LUT_UNSIGNED);
strMsg.Format(TEXT( "Colors = %d First Index = %d"), m_LeadRasterView.GetRaster().LUTColorsCount, m_LeadRasterView.GetRaster().LUTColorsFirstIndex);