PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: jthompson on October 08, 2007, 02:43:20 AM

Title: ActiveX/OCX + MapPointControl
Post by: jthompson on October 08, 2007, 02:43:20 AM
I'm new to ActiveX/OCX and am interested in using the MapPoint 2006 MapPointControl.  I've got it so that it will display the map, but I've got a few issues:


I can't figure out why it's not responding to mouse clicks, and thought it was odd that it wouldn't respond to mouse clicks while in the FireFly development environment either.  I've been trying everything I could think of, but I'm still stuck with the three problems above.

I can send any/all files to anyone, but it'd require MapPoint 2006 to use it.  If anyone wants it, let me know.  (It's sort of cool and there's a free, downloadable, 30 or 60 day trial @ http://www.microsoft.com/downloads/details.aspx?FamilyID=ea1da1af-8d89-432a-9c61-e30d76b41307&DisplayLang=en ).

If anyone can help, I'd really appreciate it!
Title: Re: ActiveX/OCX + MapPointControl
Post by: Jose Roca on October 08, 2007, 08:35:26 AM
If you go to this page
https://technet.microsoft.com/en-us/library/aa723410.aspx
you will read:

Note With MapPoint 2004, the MapPoint Control is supported only in Microsoft Visual Basic 6.0 or later.
Title: Re: ActiveX/OCX + MapPointControl
Post by: jthompson on October 08, 2007, 10:22:37 AM
That's depressing... :'(

I must've briefly read that (it's at the beginning of the help file) three to five times, but it never registered.  I assumed anything you could do with VB, you could, of course, do with PB.  Are there any tricks or anything to get it to work?  If not, the fact that it can still be used as a view-only control... Am I lucky I'm getting that much or would you expect that's the norm in this situation.

Thanks!
Title: Re: ActiveX/OCX + MapPointControl
Post by: Jose Roca on October 08, 2007, 11:18:59 AM
ActiveX controls written purposely for VB call some interfaces available only in the VB runtime and don't work properly when hosted in an ATL container.
Title: Re: ActiveX/OCX + MapPointControl
Post by: Dominic Mitchell on October 09, 2007, 12:26:04 AM
This control does not call any interfaces that are unique to VB.
It does ask for two of the newer ones and one that I don't recognize.
But that last one has no bearing on response to the mouse.

IOleInPlaceObjectWindowless
IOleInPlaceSiteEx
{9D262766-5AE9-4AB9-83A4-26E607F9A7C3}
Title: Re: ActiveX/OCX + MapPointControl
Post by: TechSupport on October 09, 2007, 09:15:30 AM
Hi Dominic,

Were you able to successfully get the control to work in Phoenix? If you did, then maybe John can use the Phoenix Visual Designer to create the MapPoint project rather than FireFly.


Title: Re: ActiveX/OCX + MapPointControl
Post by: Dominic Mitchell on October 09, 2007, 10:24:28 AM
Yes.  Mouse and keyboard work just like the MapPoint application that is shipped with the trial.
You can zoom, pan,  work with toolbars etc.
Because it asks for IOleInPlaceObjectWindowless, I thought that might be the cause of the problem, but it is a windowed control.  Then again, I have seen controls ask for an interface, don't work if it is not present, even though they never call its methods when it is present.

He is welcomed to try it in Phoenix.
Title: Re: ActiveX/OCX + MapPointControl
Post by: jthompson on October 11, 2007, 04:27:35 AM
Dominic, thanks for your help.  I downloaded and tried it out, and got the control to show, but couldn't use the interface.  I'm sure it's because I don't know a lot about Phoenix.  Could you post/email your sample to me?  Thanks!  -John
Title: Re: ActiveX/OCX + MapPointControl
Post by: Dominic Mitchell on October 11, 2007, 06:49:45 AM
Send me an email at support@phnxthunder.com and I will send you a sample together with the version of the OLE container I am using.

There appears to be some differences between the container available for download and the one I am using.