AnnGetNameOffsetX Example for Visual C++
//This sample shifts the NameOffset of the annotation object hObject
//two pixels in the X direction and one pixel in the Y direction
long lOffsetX;
long lOffsetY;
CString strMsg;
lOffsetX = m_pRasterAnn->AnnGetNameOffsetX (hObject);
lOffsetY = m_pRasterAnn->AnnGetNameOffsetY (hObject);
lOffsetX += 2;
lOffsetY += 1;
strMsg.Format(TEXT("Shifting Name Offset to %d, %d"), lOffsetX, lOffsetY);
MessageBox(strMsg);
m_pRasterAnn->AnnSetNameOffsetX (hObject, lOffsetX, FALSE);
m_pRasterAnn->AnnSetNameOffsetY (hObject, lOffsetY, FALSE);