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 5 of 5

How to programming using VC6.0

This is a discussion on How to programming using VC6.0 within the MapPoint Desktop Discussion forums, part of the Map Forums category; I want to program using VC6.0,And when I use its OCX to open a specfic mappoint,by the way ,it is ...

  1. #1
    confach is offline Junior Member White Belt
    Join Date
    Nov 2003
    Posts
    6

    How to programming using VC6.0

    I want to program using VC6.0,And when I use its OCX to open a specfic mappoint,by the way ,it is based on dialogue,it can pen the map,but it will report a error .and the code is
    Code:
    BOOL CRouteDirectionDlg::OnInitDialog()
    {
    	CDialog::OnInitDialog();
    ..........
    this->m_ctlMappoint.OpenMap("C:\\lazone.ptm");
    ...
    }
    how to solve it? have any example?

  2. #2
    Matrices is offline Member Yellow Belt
    Join Date
    Sep 2003
    Posts
    44
    try

    m_ctlMappoint.OpenMap("C:\lazone.ptm");

    instead, and make sure the map actually exists. Whats the error?

    M

  3. #3
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    No, the double backslash looks right for C. The backslash is used as an escape character for producing special characters, eg. the newline is "\n"
    To produce a conventional backslash you just repeat it.

    I have an article pending (Eric said it should be published next week) about using MapPoint from VC++ without MFC.
    My code has tested great with the Microsoft and Intel compilers, and I've had someone test against C++ Builder (that required a few changes to get it to work).

    I haven't tried to programmatically open a pre-existing map, but if you have a wider problem with the COM interface, it might help identify it?


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  4. #4
    tanguy_laverdure is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    17

    Here is the method i use to open a new map from VC++

    // Bidouille pour eviter l'erreur sur l'assert
    SetCapture();
    // Fin bidouille

    // Ouverture de la carte mappoint
    _variant_t tVar;
    short Var = 2;
    tVar = Var;
    _cMap = m_mapPointCtrl.NewMap(tVar);

    // Bidouille necessaire pour eviter un plantage (probleme d'activation du controle)
    m_pCtrlCont->OnUIDeactivate(m_mapPointCtrl.GetCtrlSite());
    m_pCtrlCont->OnUIActivate(NULL);
    SetFocus();
    ReleaseCapture();
    // Fin bidouille

  5. #5
    Matrices is offline Member Yellow Belt
    Join Date
    Sep 2003
    Posts
    44
    Quote Originally Posted by winwaed
    No, the double backslash looks right for C. The backslash is used as an escape character for producing special characters, eg. the newline is "\n"
    To produce a conventional backslash you just repeat it.

    I have an article pending (Eric said it should be published next week) about using MapPoint from VC++ without MFC.
    My code has tested great with the Microsoft and Intel compilers, and I've had someone test against C++ Builder (that required a few changes to get it to work).

    I haven't tried to programmatically open a pre-existing map, but if you have a wider problem with the COM interface, it might help identify it?


    Richard
    hmmm.... not written in C for a while but I thought in quotes it'd use a single :s

    M

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Programming using excel VBA... No GPS
    By KUSteveo in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 09-20-2008, 02:33 PM
  2. Ambiguous messages ( programming or not programming? )
    By Mohamed in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-13-2006, 04:35 PM
  3. Programming MapPoint via .NET
    By Anonymous in forum MP2K Magazine Articles
    Replies: 1
    Last Post: 02-21-2006, 10:42 AM
  4. Programming in VB.Net
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 12-01-2003, 10:52 AM
  5. In using MapPoint in programming with VB how do yo....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-27-2001, 02:53 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66