ShowAttribsDialog Example VC++

This example invokes the Annotation Attributes dialog box when the user right-clicks an annotation mark.  The type of dialog box invoked depends on the annotation type of the selected mark.

void CImgEdit1Dlg::OnMarkSelect(short Button, short Shift, long Left, long Top, long Width,
 long Height, short MarkType, LPCTSTR GroupName) 
{
    // If user right clicks on an annotation mark using the annotation
    // select tool, the attributes dialog box for that type of mark
    // will be displayed so the user could change the mark attributes

    VARIANT evt; V_VT(&evt) = VT_ERROR; // set to selected mark type 
    if(Button == 2)     // User selected mark with a right mouse click
      ImgEdit1.ShowAttribsDialog(evt);
}