AnnSetUnit Example for Visual C++
short nUnit;
m_pRasterAnn->AnnGetUnit (hCrossProd);
nUnit = m_pRasterAnn->GetAnnUnit();
nUnit = (nUnit + 1) % 10;
m_pRasterAnn->AnnSetUnit (hCrossProd, nUnit | ANN_UNIT_DEF_ABBR, "", 2, FALSE);
m_pRasterAnn->AnnSetGaugeLength (hCrossProd, 3, FALSE);
CString msg;
msg.Format(TEXT("Unit: %s\nDistance: %f\nGauge Length: %f"),
(LPCTSTR)m_pRasterAnn->AnnGetUnit (hCrossProd),
(double)m_pRasterAnn->AnnGetDistance (hCrossProd),
(double)m_pRasterAnn->AnnGetGaugeLength (hCrossProd));
AfxMessageBox(msg);