Hi Boris
In the Hello World Python sample that comes with MapBasic you can find this where we pass a reference to the MapInfo Pro object to Pyhon:
mapinfoApplication = SYSTEMINFO(SYS_INFO_IMAPINFOAPPLICATION)
mbAddIn = New_PythonCustomFrameAddin()
if mbAddIn <> 0 Then
call InitializePyAddin(mbAddIn, mapinfoApplication, ApplicationDirectory$() + ApplicationName$())
End if
You could pass the reference to the HWND in a similar way. I'd expect that you can get to this HWND via one of these functions:
WindowInfo( WIN_MAPINFO, WIN_INFO_WND)
SystemInfo(SYS_INFO_MAPINFOWND)
If this isn't what you are looking for, maybe give us some more information on what you are trying to do.
------------------------------
Peter Horsbøll Møller
Distinguished Engineer
Pitney Bowes Software & Data
------------------------------
Original Message:
Sent: 05-13-2020 04:43
From: Boris Rubtsov
Subject: Using Python for scripting in MapInfo Pro
Good afternoon. Please tell me how to pass MapInfo hwnd to Python
------------------------------
Boris Rubtsov
ESTI MAP (VAR)
MOSCOW
------------------------------