User avatar
Posts: 14323
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

How do I use GpsTools with MFC/VC++

Tue Aug 23, 2005 6:01 pm

If you use MFC VC6++ follow those steps:

Create the project:

1. Start Visual Studio VC++
2. Select File -> New in the menu
3. Select MFC AppWizard, and enter a project name. Click OK
4. Wizard Step 1. Select Dialog based application (for example). Click Next
5. Wizard Step 2. Click Next.
6. Wizard Step 3. Click Next
7. Wizard Step 4. Click Finish.
8. Click OK on confirmation dialog.

The project is now created, and you see a form in resource editor.
To insert the GpsTools Map control:

1. Right click on the form and select "Insert ActiveX Control"
2. Select "Map Control" in the "Insert ActiveX Control" dialog that opens. You will see two "Map Control", make sure you select the one linked to system32\GpsViewXP.dll (for WindowsCE select GpsViewCE.dll)
3. Click OK, the map control is now inserted. You can resize it etc. and use it as ActiveX controls are used in MFC.

To add an event handler e.g. OnMouseDown follow those steps:

1. Right click on the Map Control you inserted above. Select "Class Wizard..."
2. Select "OnMouseDown" and click "Add function...". Click OK to confirm the functions name.
3. Click "Edit code" to edit the event handler.

Everything is just normal MFC/ActiveX programming. Nothing special with GpsTools ActiveX.


Franson Support

Return to “Knowledge base GpsTools”