Community of VE/MapPoint Users and Developers
This is a discussion on Problems with ShowFindDialog within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; The first problem is that ShowFindDialog uses regional settings to determine country instead of passing a parameter to it. Is ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Problems with ShowFindDialog Second, when I call ShowFindDialog, if it takes more than 5 seconds for the user to resolve an address, I get stuck in a loop of Retry/Switch-To. I've had similar problems when I took too long running code on mouse events. But this is a MapPoint function that I've called. Once I've called this (from a non-MapPoint generated event), I can't control it. I can only wait for the user to dismiss it. Any suggestions? I'm using VC++, so that complicates things (since 99% of all MapPoint info is in VB). I can't seem to find a way to change OLE timeouts in VC++ (if there is a way). That reminds me, if anyone has an idea how to 'extend MapPoint functionality' in VC++ (like has been done in VB), I would appreciate help with that too. I've tried posting the appropriate messages to the control's parent, its parent, the frame, etc. I know it should be sent to the map's outermost window, but which one is that? Argh! Thanks to anyone who can help! |
| |||
| Re: Problems with ShowFindDialog
Hi, The original poster declares several problems which I dont fully understeand. Can you please enlighten yours ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Problems with ShowFindDialog Quote:
Hi, Wilfried. When I invoke ShowFindDialog, in 5 - 7 sec., I get stuck in a loop of Retry/Switch-To (Server is busy). I've had similar problems when I took too long running code on mouse events or use MessageBox. But this is a MapPoint function that I've called. I can only wait for the user to dismiss it. I'm using MSVC++ 2005 & MSVC++ 6.0 The results are the same. |
| |||
| Re: Problems with ShowFindDialog
Hi, You probably call it from within a MapPoint event. You cannot display a modal form in an event for longer than 10 seconds, even if it is a MapPoint form. Solution is to call it outside an event. The best way is to post a message to a custom message handler. Your custom message handler then will execute outside the event and then the problem is gone. Same thing for lenghty code or your own dialogs or menu's. Note that you can do the same with a Timer but this is considered as not a good programming technique.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Problems with ShowFindDialog Quote:
No. I have a simple dialog based test application. On the dialog are MapPoint ActiveX ctrl and some buttons. I call ShowFindDialog from ButtonClick message handler: Code: voidCPOI_TestDlg::OnBnClickedFindBtn()
{
|
| |||
| Re: Problems with ShowFindDialog
Hi, I just did same test: Code: MP.ActiveMap.ShowFindDialog(street, GeoFindState.geoFindAddress, 0, false); Maybe some other code is executing because the the dialog is a modal form and so it is pumping messages. Also some events are fired, for example if street is a valid street then SelectionChange is fired at that moment. Maybe some other events too, I did not check.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Problems with ShowFindDialog
Hi, Very strange. And you are absolutely sure no event is executed where something else takes time ? If yes then there is something wierd in VC++ with that function. Then best is to show your own dialog I think.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Problems with ShowFindDialog Quote:
I'm sure that no event is executed where something else takes time. Application has only one Dialog wnd with MP & Button and handler for BtnClick. That's all. But I found acceptable solution: FindWindow or EnumChildWindows untill "AfxFrameOrView70" found and PostMessage. (article of Sergey Pavlov, thanks) Thank You. |
![]() |
| Tags |
| problems, showfinddialog |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Complete adress, when using ShowFindDialog? | Jarun | MapPoint 2006/2009 Discussion | 3 | 04-11-2005 02:31 PM |
| Object returned by ShowFindDialog | Anonymous | MapPoint 2006/2009 Discussion | 0 | 04-15-2004 11:00 AM |
| Problems with ShowFindDialog function in C++ | Anonymous | MapPoint 2006/2009 Discussion | 1 | 10-06-2003 05:13 AM |
| ShowFindDialog not quite as modal as it should | Anonymous | MapPoint 2006/2009 Discussion | 4 | 04-07-2003 04:17 AM |
| Starting showfinddialog with other country name??? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 01-24-2003 04:26 PM |