Building an ArcGIS Controls map viewer application
TransformEvents.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 __TRANSFORMEVENTS_H_
#define __TRANSFORMEVENTS_H_

// ArcObjects Headers 
// Engine
#include <ArcSDK.h>
// Controls
#include <Ao/AoControls.h>

extern IMapControl3Ptr g_ipMapControl;
extern IEnvelopePtr g_ipCurrentExtent;

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

    
  // ITransformEvents
  HRESULT __stdcall BoundsUpdated(IDisplayTransformation* sender);
  HRESULT __stdcall DeviceFrameUpdated(IDisplayTransformation* sender, VARIANT_BOOL sizeChanged);
  HRESULT __stdcall ResolutionUpdated(IDisplayTransformation* sender);
  HRESULT __stdcall RotationUpdated(IDisplayTransformation* sender);
  HRESULT __stdcall UnitsUpdated(IDisplayTransformation* sender);
  HRESULT __stdcall VisibleBoundsUpdated(IDisplayTransformation* sender, VARIANT_BOOL sizeChanged);
};

#endif // __TRANSFORMEVENTS_H_