Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

Automating MapPoint in C++ With Built In GPS Features Enabled

This is a discussion on Automating MapPoint in C++ With Built In GPS Features Enabled within the MP2K Magazine Articles forums, part of the Map Forums category; Automating MapPoint in C++ With Built In GPS Features Enabled "Jonathan Oppelaar shows how he used techniques to overcome limitations ...

  1. #1
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Automating MapPoint in C++ With Built In GPS Features Enabled

    Automating MapPoint in C++ With Built In GPS Features Enabled

    "Jonathan Oppelaar shows how he used techniques to overcome limitations in the MapPoint API to make MapPoint a better navigation platform for Project54, a in-car law enforcement system currently in use in over 1,000 vehicles."

    Full article --

    Automating MapPoint in C++ With Built In GPS Features Enabled

  2. #2
    jonp54 is offline Junior Member White Belt
    Join Date
    Jul 2007
    Posts
    8

    Re: Automating MapPoint in C++ With Built In GPS Features Enabled

    If any one is also having issues with with the boolean functions that determine if a button was pressed, i found a more reliable method than what Paul was suggesting. Here is my IsTracking function. You have to include Oleacc.lib to your project or dynamically link the dll. I would recommend including it in your project.

    int MapPt::IsTracking()
    {
    logFile<<"IsTracking()\n";
    IAccessible * acc=NULL;

    VARIANT idxIn;
    VariantInit(&idxIn);
    V_VT(&idxIn) = VT_I4;
    V_I4(&idxIn) = CHILDID_SELF;

    VARIANT idxOut;
    VariantInit(&idxOut);
    V_VT(&idxOut) = VT_I4;




    // Obtain the IAccessible object from the parent window
    HRESULT hr = AccessibleObjectFromWindow(m_hwBtnStartGPSTracking ,OBJID_CLIENT,IID_IAccessible,(LPVOID*)&acc);
    if(SUCCEEDED(hr))
    {
    acc->get_accState(idxIn,&idxOut);
    return V_I4(&idxOut);
    }
    else
    return -1;

    }

    If you look in "Oleacc.h" you can see what the different values get_accState returns. There are probably 20 different states the button can be in. Search for SYSTEM_STATE_UNCHECKED in Oleacc.h and it will bring you to all the definitions.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Built-in Undo/Redo functionality?
    By Boelling in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 11-15-2004, 04:52 AM
  2. Automating Mappoint
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 07-26-2004, 03:29 PM
  3. Automating MapPoint with the .NET SDK
    By Anonymous in forum MP2K Magazine Articles
    Replies: 2
    Last Post: 10-21-2002, 06:41 PM
  4. I am wondering if anyone has built a COM add-in ap....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-13-2002, 09:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27