18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUILDING APPLICATIONS WITH C++ AND CONTROL WIDGETS<br />

g_ipPageLayoutControlEventHelper = 0;<br />

delete g_pageLayoutEvents;<br />

g_ipTOCControlEventHelper->UnadviseEvents();<br />

g_ipTOCControlEventHelper->Shutdown();<br />

g_ipTOCControlEventHelper = 0;<br />

delete g_tocEvents;<br />

g_ipTransEventHelper->UnadviseEvents();<br />

g_ipTransEventHelper->Shutdown();<br />

g_ipTransEventHelper = 0;<br />

delete g_transEvents;<br />

g_ipMapControlEvent2Helper->UnadviseEvents();<br />

g_ipMapControlEvent2Helper->Shutdown();<br />

g_ipMapControlEvent2Helper = 0;<br />

delete g_mapEvents;<br />

g_ipCustomizeEventHelper->UnadviseEvents();<br />

g_ipCustomizeEventHelper->Shutdown();<br />

g_ipCustomizeEventHelper = 0;<br />

delete g_customizeEvents;<br />

6. Update the makefile. Add CustomizeDialogEvents.cpp to the sources list and<br />

add CustomizeDialogEvents.h to the MapViewer.cpp dependencies list. Make<br />

a dependencies list for CustomizeDialogEvents.o.<br />

7. Compile and run the application. Check the customize toggle button to put<br />

the ToolbarControl into customize mode and open the Customize dialog box.<br />

8. On the Commands tab, choose the Graphic Element category and either drag<br />

the Select Elements command to the toolbar or double-click it to add it to the<br />

ToolbarControl. By right-clicking an item on the toolbar, you can adjust the<br />

appearance in terms of style and grouping. Change the icon you have just<br />

added to display both image and text.<br />

Chapter 6 • <strong>Developer</strong> scenarios • 407

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!