Building an ArcGIS Controls map viewer application
TOCControlEvents.h
// Copyright 2010 ESRI
// 
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
// 
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
// 
// See the use restrictions.
// 

 
#ifndef __TOCCONTROLEVENTS_H_
#define __TOCCONTROLEVENTS_H_

#include <ArcSDK.h>
#include <Ao/AoControls.h>

class TOCControlEvents : public ITOCControlEventsHelper
{

 public:
  
  // IUnknown
  HRESULT __stdcall QueryInterface(REFIID riid, void** ppvObj) { return S_OK; }
  ULONG   __stdcall AddRef()                                   { return 0;    }
  ULONG   __stdcall Release()                                  { return 0;    }

    
  // ITOCControlEvents
  void __stdcall OnMouseDown(long button, long shift, long x, long y);
  void __stdcall OnMouseUp(long button, long shift, long x, long y);
  void __stdcall OnMouseMove (long button, long shift, long x, long y);
  void __stdcall OnDoubleClick (long button, long shift, long x, long y);
  void __stdcall OnKeyDown (long keyCode, long shift);
  void __stdcall OnKeyUp (long keyCode, long shift);
  void __stdcall OnBeginLabelEdit (long x, long y, VARIANT_BOOL* CanEdit);
  void __stdcall OnEndLabelEdit (long x, long y, BSTR newLabel, VARIANT_BOOL* CanEdit);
};

#endif // __TOCCONTROLEVENTS_H_