SetRgnColorRGBRange example for C++ 5.0 and later
//This example sets a region corresponding to all colors that
//have an rgb that include red but no green and no blue
void CRemapHueDlg::OnSetRgnColorRGBRange()
{
OLE_COLOR rgbLo;
OLE_COLOR rgbHi;
rgbLo = RGB(1, 0, 0);
rgbHi = RGB(255, 0, 0);
m_RasterView.GetRaster().SetRgnColorRGBRange(rgbLo, rgbHi, L_RGN_SET);
m_RasterView.SetRgnFrameType(RGNFRAME_ANIMATED);
}