AnnGetNameOffsetX example for C++ 5.0 and later
//This sample shifts the NameOffset of the annotation object hObject
//two pixels in the X direction and one pixel in the Y direction
void CVCsampleLoadMemoryDlg::SampleNameOffset(OLE_HANDLE hObject)
{
long lOffsetX;
long lOffsetY;
CString strMsg;
lOffsetX = m_Lead1.AnnGetNameOffsetX(hObject);
lOffsetY = m_Lead1.AnnGetNameOffsetY (hObject);
lOffsetX += 2;
lOffsetY += 1;
strMsg.Format("Shifting Name Offset to %d, %d", lOffsetX, lOffsetY);
MessageBox(strMsg);
m_Lead1.AnnSetNameOffsetX (hObject, lOffsetX, FALSE);
m_Lead1.AnnSetNameOffsetY (hObject, lOffsetY, FALSE);
}