DocumentWindow control not working in 64-bit version

38 views
Skip to first unread message

Sergi Gàmiz Ribelles

unread,
Sep 28, 2022, 5:48:52 PM9/28/22
to MapInfo-L
Hi. Here a new problem. I have built an application with a DocumentWindow control in a dialog, where a mapper is opened and clicked on. This control works fine compiled with MapBasic 15 (32-bit), but not in MapBasic 16 (64-bit) in which the map opens as a new tab instead of opening in the dialog (neither you can click on the map outside of the dialog while it is open). I've read through both MapBasic manuals but haven't found any differences about DocumentWindow controls.
Has anyone run into the same problem? Does anyone know how to fix it?
Thank you very much.
SGR

Peter Horsbøll Møller

unread,
Sep 29, 2022, 2:50:50 AM9/29/22
to mapi...@googlegroups.com

Hi Sergi

 

When we switched to the ribbon interface with the 64-bit versions of MapInfo Pro, there were a few things that we weren’t able to support in the same way as previously, unfortunately. In your case it was this statement: Set Next Document Parent

 

To embed a window into a Document control, you need to use a different approach now.

I have created a function that can help you do this: WINCreateForDocumentControl

 

You can find it as part of the MapBasic Libraries on Github.

It is part of the WINDOWLib.

 

It’s quite easy to use as it takes two parameters:

  1. The ID of the Document control
  2. The statement to create your window, for example: “Map From SomeTable”

 

Hope this helps

 

Peter

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

From: mapi...@googlegroups.com <mapi...@googlegroups.com> On Behalf Of Sergi Gàmiz Ribelles
Sent: Wednesday, 28 September 2022 23.49
To: MapInfo-L <mapi...@googlegroups.com>
Subject: [MI-L] DocumentWindow control not working in 64-bit version

 

This message originated Externally. Use proper judgement and caution with attachments, links, or responses.

 

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/cae6bff5-4f3f-4709-ac44-19d2cd70a1acn%40googlegroups.com.

Sergi Gàmiz Ribelles

unread,
Sep 29, 2022, 9:27:39 AM9/29/22
to MapInfo-L
Hi Peter, thank you.
Which is the minimum MAPBASIC version required for that WINCreateForDocumentControl function?
SGR
El dia dijous, 29 de setembre de 2022 a les 8:50:50 UTC+2, Peter Horsbøll Møller va escriure:

Peter Horsbøll Møller

unread,
Sep 29, 2022, 9:40:29 AM9/29/22
to mapi...@googlegroups.com

Hi

 

I’d say maybe 12.5 or even older but I haven’t tried.

My initial thought was some 64-bit version.

But this thread reminded me that the Declare Method existed prior to 64-bit.

 

If you copy the method into your own module, note that it uses other functions in the WindowLib module.

If you want to include the WindowLib module in the your project, note that it uses other modules too.

Sergi Gàmiz Ribelles

unread,
Sep 30, 2022, 6:57:15 AM9/30/22
to MapInfo-L
Peter, thank you very much. Solved with  WINCreateForDocumentControl function. Great.
SGR
El dia dijous, 29 de setembre de 2022 a les 15:40:29 UTC+2, Peter Horsbøll Møller va escriure:

bill....@gmail.com

unread,
Sep 30, 2022, 7:51:54 AM9/30/22
to MapInfo-L
MIPro 2021 has  Set Next Document Parent re-enabled for MapBasic\.Net, etc.  Had to do some extra work to make it function correctly in x64 codebase for embedding Map and Browser Windows and DocumentWindow controls (MapBasic).  In the MapBasic Samples there is an AlphaShapes tool that embeds a mapper into a DocumentWindow and the WindowManager tool also uses same command to add\remove embedded theme legend windows from mappers.
Reply all
Reply to author
Forward
0 new messages