Label edit
TOCControlEvents.h
// Copyright 2011 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 OnMouseDown(long button, long shift, long x, long y);
  void OnMouseUp(long button, long shift, long x, long y);
  void OnMouseMove (long button, long shift, long x, long y);
  void OnDoubleClick (long button, long shift, long x, long y);
  void OnKeyDown (long keyCode, long shift);
  void OnKeyUp (long keyCode, long shift);
  void OnBeginLabelEdit (long x, long y, VARIANT_BOOL * CanEdit);
  void OnEndLabelEdit (long x, long y, BSTR newLabel, VARIANT_BOOL * CanEdit);
};

#endif // __TOCCONTROLEVENTS_H_