Hi everyone,
I am using a prebuilt MapWinGIS-5.1.1-x32/x64-VS2017
and I have VS2019 16.5.
The trouble I encoutered like this:
-
MapWinGIS activeX works well in a C# program.
-
MapWinGIS activeX is successfully embedded into a dialog of a ATL/WTL C++ program,
and I test in resource editor fine (Ctrl + T), the activeX map is displayed well.
but when I run the progam, it crashes. It crashes in both x32 and x64 platforms.
The crash point locates in atlhost.h
// IOleInPlaceSiteEx
STDMETHOD(OnInPlaceActivateEx)(
_In_opt_ BOOL* /*pfNoRedraw*/,
DWORD dwFlags) {
...
if (m_spInPlaceObjectWindowless)
m_spInPlaceObjectWindowless->SetObjectRects(&m_rcPos, &m_rcPos); <-- crashes at this point.
return S_OK;
}
Is there anyone integrating MapWinGIS to a ATL/WTL or a C++ program successfully?
I would like to get an advice to overcome the issue.