GetSelectedAnnotationFillColor Example VC++

This example uses the GetSelectedAnnotationFillColor method to determine the fill color of a selected annotation.  It then updates the Microsoft common dialog box to indicate the color obtained.

This example also uses the Microsoft common dialog box and the SetSelectedAnnotationFillColor method to change the fill color of a selected annotation.

void CImgEdit2Dlg::OnFillcolor() 
{
    // This example uses the Microsoft color dialog box to
    // change a selected annotation mark's fill color.
    
    long FillColor;
    // Determine the current color of the selected annotation
    // mark and init the dialog box color property to that color.
    FillColor = ImgEdit1.GetSelectedAnnotationFillColor();
    CommonDialog1.SetColor(FillColor);
    CommonDialog1.SetFlags(1); // cdlCCRGBInit
    
    CommonDialog1.ShowColor();
    ImgEdit1.SetSelectedAnnotationFillColor(CommonDialog1.GetColor());
}