MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Sluggish refresh on startup

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 ...


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

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 01-29-2008
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
Sluggish refresh on startup

Hi All,

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
Attached Images
File Type: jpg Good.jpg (70.1 KB, 5 views)
File Type: jpg bad.jpg (17.1 KB, 4 views)
Attached Files
File Type: zip MapPoint Testing.zip (627.4 KB, 2 views)
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 01-31-2008
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 237
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
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-01-2008
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
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
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-03-2008
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
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
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 02-03-2008
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
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");
	}
Please let me know if this has been of use to any of you!

Cheers,

Dave
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
refresh, sluggish, startup


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


All times are GMT -5. The time now is 08:28 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 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.


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