Hi,
I've found the following code in this forum:
I hope it gives some help
Code:
OK, this is what worked for me.
In your CMapPointCtrl class add this public function:
inline COleControlSite* GetCtrlSite() {return m_pCtrlSite;}
Remember that when you re-init your activeX control this file will get written over.
And then when you initiliaze the map do this:
SetCapture();
// Open the MAP
VARIANT var;
var.vt = VT_INT;
var.intVal = 1; //geoMapUSA
CMap1 map = m_MapPoint.NewMap(var);
// This fixes the problem
m_pCtrlCont->OnUIDeactivate(m_MapPoint.GetCtrlSite());
m_pCtrlCont->OnUIActivate(NULL);
SetFocus();
ReleaseCapture();