When using a MapPoint 2006 control in a VC++ MFC dialog application, setting the Cancel output argument seems to have no effect for me.
The relevant code is:
afx_msg void OnBeforeClickMap(long Button, long Shift, long X, long Y, BOOL FAR* Cancel);
ON_EVENT(MainDialog, IDC_MAP_CONTROL, 209 /* BeforeClick */, OnBeforeClickMap, VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_PBOOL)
void TestDialog::OnBeforeClickMap(long Button, long Shift, long X, long Y, BOOL FAR* Cancel)
*Cancel = TRUE;
The callback is entered OK, with Button, Shift, X and Y as expected and *Cancel FALSE, but the control is still responding to the click events.
Judging from other posts, this obviously works with VB and C# etc. Does anyone know why it should be a problem with VC++ (6)?