AnnSetUnit example for Visual C++ 4.0 and later
short nUnit;
long hCrossProd;
m_Lead1.AnnGetUnit (hCrossProd, &nUnit, NULL);
nUnit = (nUnit + 1) % 10;
m_Lead1.AnnSetUnit (hCrossProd, nUnit | ANNUNIT_DEF_ABBR, NULL, 2, FALSE);
m_Lead1.AnnSetGaugeLength (hCrossProd, 3, FALSE);
CString msg;
msg.Format("Unit: %s\nDistance: %f\nGauge Length: %f",
(LPCSTR)m_Lead1.AnnGetUnit(hCrossProd, NULL, NULL),
(double)m_Lead1.AnnGetDistance (hCrossProd, NULL),
(double)m_Lead1.AnnGetGaugeLength (hCrossProd));
AfxMessageBox(msg);