Skyline - it's your world

Developer

Product Overview
Why should you choose SkylineGlobe products? Click here...

Contact Us

Developer - C++ MFC


Getting started

  1. Download and install TerraExplorer Plus.
  2. Create a new MFC Application project in Visual Studio using Visual C++.
    • In Visual Studio, select File> New> Project.
    • Select Visual C++ >MFC >MFC Application.
    • Name the project TerraExplorerShowcase.
    • Click OK and then click Next.
    • In the Aplication type field select dialog based.
    • Click Finish.
  3. Add TerraExplorer ActiveX objects to the Toolbox
    • In Design view, right click the Toolbox, and select Choose Items.
    • Click the COM Components tab and select the TE3DWindow Class, TEInformationWindow Class and TENavigationMap Class check-boxes.
    • Click OK. Three icons are added to your toolbox: the 3D Window, the Information Window and the Navigation Map controls.
  4. Add a 3D Window to the form.
    lick the 3D window control icon in the toolbox and drag it to the required location on your form.
  5. In your main dialog .cpp file add the "#import" statement after the include statements to link your project to the TerraExplorer COM interface. Make sure the name of the file in this command points to the TerraExplorer or TerraExplorer Pro executable on your computer.
    #import "C:\Program Files\Skyline\TerraExplorer\TerraExplorerX.dll" no_namespace, named_guids
  6. Create the SGWorld CoClass in the ::OnInitDialog method.
    Note: The constant CLSID_SGWorld is automatically defined by the "#import" command.
    ISGWorld6Ptr pISGWorld;
    pISGWorld.CreateInstance(CLSID_SGWorld);
  7. Call the methods on the interface pointer.
    pISGWorld->Project->Open("http://www.skylinesoft.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly",FALSE,"","");
    IPosition6Ptr pIPosition6 = pISGWorld->Creator->CreatePosition(-77.036667, 38.895111, 1500,AltitudeTypeCode::ATC_TERRAIN_RELATIVE,0,0,0,0);
    pISGWorld->Navigate->FlyTo(_variant_t(pIPosition6),ActionCode::AC_FLYTO);
  8. Download additional code samples and examples of TerraExplorer’s capabilities for C++ MFC or C++ ATL.

Related Links & Files

© 2011 Skyline Software Systems Inc. All rights reserved.  contact us  |  support  |  legal notice  |  privacy

Content

Close