This example uses the SaveAnnotations method to save annotations to a file that is separate from the image file.
void CImgEdit2Dlg::OnSaveanotation()
{
// This example would enable annotations to be saved to
// a file and stored separately from the image file.
// Useful if you want to annotate images but not modify
// the original file (ex. for legal purposes, or if the image
// is on optical disk). Use in conjunction with LoadAnnotations.
// Save the annotation marks on page 1 of the displayed
// file to a new file and remove them from the existing file.
// annotation stored separately defines
#define KEEP_ANNOTATIONS 0
#define REMOVE_ANNOTATIONS 1
ImgEdit1.SaveAnnotations ("c:\\savemark.ano", 1, 1, REMOVE_ANNOTATIONS);
}