Hi everyone:
I want the postal code of a region on which the user clicks to be returned. So I use the 'OnBeforeClickControl1()' event handler and what I do is the following:
void CMapPointTest1View::OnBeforeClickControl1(long Button, long Shift, long X, long Y, BOOL FAR* Cancel)
{
m_location=m_map.XYToLocation(X,Y);
m_location.GoTo();
m_location.Select();
CStreetAddress sa = m_location.GetStreetAddress();
CString postalcode=sa.GetPostalCode();
}
m_location is a CLocation object, m_map is a CMap1 object.
But the CString 'postalcode' is empty! WHY ???