ZoomIn.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 __ZOOM_IN_H_ #define __ZOOM_IN_H_ // ArcObjects Headers // Engine #include <ArcSDK.h> // Controls #include <Ao/AoControls.h> // Custom Tool #include <Ao/AoToolBase.h> class ZoomIn : public CAoToolBase { public: ZoomIn(); ~ZoomIn(); // ICommand HRESULT get_Enabled(VARIANT_BOOL* Enabled); HRESULT get_Checked(VARIANT_BOOL* Checked) ; HRESULT get_Name(BSTR* Name); HRESULT get_Caption(BSTR* Caption); HRESULT get_Tooltip(BSTR* Tooltip); HRESULT get_Message(BSTR* Message); HRESULT get_Bitmap(OLE_HANDLE* bitmapFile); HRESULT get_Category(BSTR* categoryName); HRESULT OnCreate(IDispatch* hook); HRESULT OnClick(); // ITool HRESULT get_Cursor(OLE_HANDLE* cursorName); HRESULT OnMouseDown(LONG Button, LONG Shift, LONG X, LONG Y); HRESULT OnMouseMove(LONG Button, LONG Shift, LONG X, LONG Y); HRESULT OnMouseUp(LONG Button, LONG Shift, LONG X, LONG Y); HRESULT OnDblClick(); HRESULT OnKeyDown(LONG keyCode, LONG Shift); HRESULT OnKeyUp(LONG keyCode, LONG Shift); HRESULT OnContextMenu(LONG X, LONG Y, VARIANT_BOOL* handled); HRESULT Refresh(OLE_HANDLE ole); HRESULT Deactivate(VARIANT_BOOL* complete); private: IHookHelperPtr m_ipHookHelper; OLE_HANDLE m_hBitmap; OLE_HANDLE m_hCursor; OLE_HANDLE m_hCursorMove; IPointPtr m_ipPoint; bool m_bInUse; INewEnvelopeFeedbackPtr m_ipFeedback; }; #endif // #define __ZOOM_IN_H_