Community of VE/MapPoint Users and Developers
This is a discussion on Sluggish refresh on startup within the Development forums, part of the MapPoint 2006/2009 Discussion category; Hi All, I've been experiencing a problem where *sometimes*, the MapPoint control seems to not draw itself, or only perform ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Sluggish refresh on startup I've been experiencing a problem where *sometimes*, the MapPoint control seems to not draw itself, or only perform a partial draw (say the Microsoft logo with no map.) Has anyone else seen this and/or come up with graceful ways to detect and invalidate in this situation? I created a bare-bones test application, which is a Visual Studio 6.0 C++ MFC dialog with the statically linked mfc dll. It includes the OnUIDeactivate fix from these forums ( Map Point ActiveX in MFC View (MDI application) ), opens a new US map, and that's it. The test application exhibits the problem. I've attached the whole test source, including exes, but not the intermediate source (for size reasons) if anyone is interested. *You'll need MapPoint North America installed before you run the application.* Also, I've included a sample image of a good startup window (includes map), and one of a bad startup window (no map.) Cheers, Dave |
| |||
| Re: Sluggish refresh on startup
Hi Dave, Yep, I have that problem. I used UpdateWindow on the whole heirarchy and SetFocus, as well. No solution so far. I'll figure it out eventually ... Mike Mattys |
| |||
| Re: Sluggish refresh on startup
It's both good and bad that you share my pain! Invalidate(TRUE) on the main dialog seems to be able to recreate the refresh problem every time. I wonder if we can override OnEraseBkgnd in the Generated Mappoint control class, and do something there to fix it? (Providing the file's backed up, in case Studio regenerates the file.) Cheers, DaveH |
| |||
| Re: Sluggish refresh on startup
Well, if you find the actual map window of the MapPoint control (by using Spy++ or similar), and send it an Invalidate(FALSE) in the MapPoint control's OnEraseBkgnd function, before the call to the base CWnd::OnEraseBkgnd(pDC), it seems to fix the refresh - with no side effects noticed (so far.) Cheers, Dave |
| |||
| Re: Sluggish refresh on startup
Also, Edit: Note that MapPoint 2006's internal map window is in a different location to that of 2002 and 2004. Here's my simple code, generated after using Spy++ : Code: if (nVersion == 13) {
hwndMapCtrlHandle = FindWindowEx((HWND) *pWndChild,0,"AfxFrameOrView70", NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:00400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:00400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:00400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:00400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:00400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:00400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:00400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AfxWnd70","Map Control");
} else if ((nVersion == 11) || (nVersion == 9)) {
hwndMapCtrlHandle = FindWindowEx((HWND) *pWndChild,0,"AfxFrameOrView42", NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AFX:400000:8",NULL);
hwndMapCtrlHandle = FindWindowEx(hwndMapCtrlHandle,0,"AfxWnd42","Map Control");
}
Cheers, Dave |
![]() |
| Tags |
| refresh, sluggish, startup |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MapPoint Map Refresh | andreaplanet | MapPoint 2006/2009 Discussion | 11 | 11-29-2006 04:07 AM |
| Each startup: installation, configuring, gathering info | terryww | MapPoint 2006/2009 Discussion | 2 | 01-29-2005 02:38 PM |
| How can I refresh the data link from VB | flymoe | MapPoint 2006/2009 Discussion | 2 | 10-21-2004 06:46 AM |
| prog hangs on startup | Anonymous | MapPoint 2006/2009 Discussion | 3 | 09-18-2004 08:50 AM |
| How to refresh a Map | Anonymous | MapPoint 2006/2009 Discussion | 1 | 01-03-2003 03:42 PM |
Cheap flights to Rhodes
For cheap flights to Rhodes make Holiday Hypermarket your final destination. Holiday Hypermarket help you to have a fantastic affordable holiday.
Travel Agent UK
Travel Counsellors was named UK's Best Travel Agent at the Guardian Unlimited travel awards. Whatever your travel needs we can help.
Flight
When looking to jet set off, make sure you check out dealchecker.co.uk before you check in anywhere else. Bag a bargain flight from all major scheduled and charter airlines.
Sri Lanka Holidays
There are some outstanding deals on Sri Lanka holidays at theholidayplace.co.uk. Sri Lanka is renowned for it's exceptional beauty! Book a holiday today!
Cheap Balearics Holidays
Cheap Balearics holidays are available if you know when to book and who to book with. The Balearics have many fascinating places to visit all year round. The partying never stops.
Cheap Travel
For cheap travel options, visit Travel.co.uk and explore the benefits of our comparison site.
Cyprus Holidays
Fancy a Mediterranean holiday? Get information on Cyprus holidays at On The Beach.