MarkEnd Example VC++

In this example, when the MarkEnd event fires, the Undo selection on the Edit menu is updated so it indicates the action the Undo method will perform if the user invokes it.

void CImgEdit2Dlg::OnMarkEnd(long Left, long Top, long Width, long Height, short MarkType,
 LPCTSTR GroupName) 
{
    // This event could be used after an annotation mark is drawn
    // to change the caption on an undo menu selection to indicate
    // what action undo will take.
    mnuEditUndo.Caption = "Undo Annotation";
}