Community of VE/MapPoint Users and Developers
This is a discussion on Access Violation within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have a vc++ dialog app with dialogs in a tab control. One of the dialogs has the mappoint control ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Access Violation Have you seen this behavior? Has anyone found a solution? thanks in advance |
| |||
| NewMap access violation
I, too, get an access violation after I create a NewMap in my application. I made it so that when my app starts up, the MappointCtrl is hidden and there is a CListCtrl shown in the same place. I have a button that shows the MappointCtrl and hides the CListCtrl. The map shows up fine. And the first time I run the application after doing a "Rebuild All" it runs fine. But every time I run it after that I get an Access Violation and it shows me the dissassembly (which doesn't really help me figure out what's going on). Code: void CMainFrame::OnMapView( ) {
CRouteProgressView* pRPV = NULL;
CRoadRunnerMobileApp* pApp = (CRoadRunnerMobileApp*)AfxGetApp();
if (pApp != NULL)
pRPV = pApp->pProgressView; // pointer to the dialog class with the controls
else
return;
CListCtrl *list = pRPV->getListCtrl();
CMappointCtrl *map = pRPV->getMapCtrl();
if( !map->IsWindowVisible() ) {
list->ShowWindow( SW_HIDE );
map->ShowWindow( SW_SHOW );
map->SetActiveWindow();
pRPV->createNewMap();
} else {
map->CloseMap();
list->ShowWindow( SW_SHOW );
map->ShowWindow( SW_HIDE );
}
}
--------------------------------
class CRouteProgressView : public CFormView
{
...
CMappointCtrl* getMapCtrl() { return &m_Map; };
CListCtrl* getListCtrl() { return &m_List; };
void createNewMap() {
VARIANT a;
a.vt = VT_I4;
a.lVal = 1; // 1 for America 2 for geoMapEurope!
m_Map.NewMap(a);
};
...}
|
| |||
| Re: Access Violation
Hi, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: NewMap access violation
Hi, Quote:
Eventually check with task manager, or make a small application that remove all mappoint instances out of memory before a second run to see if that is the reason. To remove all mappoint instances there is example of it in FAQ.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
Cheap Skiing
When it comes to cheap skiing, Holiday Hypermarket will speed you on your way. Searching the leading travel brands, Holiday Hypermarket offers you great value skiing.
Travel Counselors
Travel Counselors are an award winning Travel Agent. Why not have a personal Travel Counselor help with your travel plans.
Holidays to Thailand
The best cultures and backgrounds make Thailand an interesting and memorable country to visit. Book great value holidays to Thailand online at dealchecker.co.uk.
Holidays to St Lucia
Holidays to St Lucia will leave you smiling. The spectacular scenery and the warmth of the locals make holidays to St Lucia unforgettable.
Cheap Morocco Holidays
Cheap Morocco holidays may be the answer to your cheap holiday search. With sunshine throughout most of the year it can be great value if you avoid the peak season. Why not include a trip to the small tranquil town of Chefchaouen Tangier in your visit?
Travel Deals
Click here and read up on the travel deals available online.
Fuerteventura Holidays
Visit one of the closest Canary Islands to Africa! Book Fuerteventura holidays at On The Beach!