MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to programming using VC6.0

This is a discussion on How to programming using VC6.0 within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-26-2004
Junior Member
White Belt
 
Join Date: Nov 2003
Posts: 6
Send a message via MSN to confach
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2004
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2004
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 850
Blog Entries: 7
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
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2004
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 03-01-2004
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
programming, vc60


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Programming using excel VBA... No GPS KUSteveo MapPoint 2006/2009 Discussion 5 3 Weeks Ago 01:33 PM
Ambiguous messages ( programming or not programming? ) Mohamed MapPoint 2006/2009 Discussion 1 06-13-2006 03:35 PM
Programming MapPoint via .NET Anonymous MP2K Magazine Articles 1 02-21-2006 09:42 AM
Programming in VB.Net Anonymous MapPoint 2006/2009 Discussion 3 12-01-2003 09:52 AM
In using MapPoint in programming with VB how do yo.... Anonymous MapPoint 2006/2009 Discussion 1 11-27-2001 01:53 AM


All times are GMT -5. The time now is 06:32 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Cheap Flight to Tenerife
Get a cheap flight to Tenerife and a cheap hotel in Tenerife giving you a great value holiday in Tenerife. Holiday Hypermarket can make it happen.

Business Travel Agent
Book your business travel with a specialist business travel agent. Travel Counsellors are an award winning travel agent.

Flights Canada
Our search results will show you a selection of airlines, travel agents and tour operators offering cheap flights to Canada. See for yourself who has the cheapest deals.

Holidays to Dominican Republic
Holidays to Dominican Republic offer a wealth of natural beauty and magnificent views. Come alive in the splendor of the Dominican Republic!

Tunisia
Tunisia enjoys excellent weather, golden beaches and a beautiful blue sea. Moving away from the beach you will find a country that has a rich and varied past. Discover the secrets of history yourself by exploring all the ruins.

Travel Tickets
Travel tickets need not always be expensive. Check out your best travel comparison site, Travel.co.uk

Goa Holidays
Enjoy the warm and sunny climate of Western India. Visit On The Beach for information on Goa holidays.


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