18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

MwCtlAppMainLoop(app_context);<br />

7. Before you shut down the application, you need to clean up the global<br />

ArcObjects. Do this by setting the pointer for each control to 0.<br />

void CloseAppCallback(Widget w, XtPointer client_data,<br />

XtPointer call_data)<br />

{<br />

g_ipToolbarControl = 0;<br />

g_ipMapControl = 0;<br />

g_ipTOCControl = 0;<br />

g_ipPageLayoutControl = 0;<br />

// Uninitialize the engine<br />

8. Compile the application by typing “make –f Makefile.SolarisMotif ” at the<br />

command line.<br />

9. Run the application by typing either “make run –f Makefile.SolarisMotif ” or<br />

“./MapViewer” at the command line. Notice how the controls have been<br />

placed in the application window. At this point the controls are all empty<br />

because no commands or data have been added. Try resizing the main form,<br />

and see that the TOCControl maintains its width, the ToolbarControl its<br />

height, and the MapControl its dimensions, but the other dimensions and<br />

controls resize themselves.<br />

368 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!