This example places a customized rubber stamp at a predetermined location on the image. TheAnnotationStampText property is set to the desired stamp content, which includes a combination of text and date macros.
void CImgEdit1Dlg::OnRubberStamp()
{
// Places a customized rubber stamp at a predetermined
// location on the image. Font used is Courier and color
// is red
COleFont szFontType;
szFontType = ImgEdit1.GetAnnotationFont();
szFontType.SetName("Courier New");
ImgEdit1.SetAnnotationFont(szFontType);
ImgEdit1.SetAnnotationFontColor(0xFF); // vbRed
// This stamp uses embedded text macros for date and time
ImgEdit1.SetAnnotationStampText("Application received on %B %d, %Y at %H");
ImgEdit1.SetAnnotationType(8); // wiTextStamp // 8
VARIANT evt; V_VT(&evt) = VT_ERROR; // set to default
ImgEdit1.Draw(10, 10, evt, evt);
}