When the 'Open MXD' button is used in the EngineControls sample(to switch from MXD with a custom layer to a blank MXD), the custom layer is not being unloaded properly.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM012188
已提交
October 5, 2007
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
编程语言
VC++
修正版本
9.3
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
Need to clear the ActiveView when the OnPageLayoutReplaced event is calledHere are the code changes for a workaround. In the file EngineControlsDlg.cpp - HRESULT CEngineControlsDlg::OnPageLayoutReplaced(VARIANT newMap){ if(m_ipPageLayout) { m_ipPageLayout ->Clear(); } m_ipPageLayoutControl->get_ActiveView(&m_ipPageLayout); // Get the IActiveView of the focus map in the PageLayoutControl IActiveViewPtr ipActiveView; m_ipPageLayoutControl->get_ActiveView(&ipActiveView); In the file EngineControlsDlg.h – // The Controls IToolbarControlPtr m_ipToolbarControl; IToolbarControlPtr m_ipMapToolbarCtrl; ITOCControlPtr m_ipTOCControl; IMapControl3Ptr m_ipMapControl; IPageLayoutControl2Ptr m_ipPageLayoutControl; IActiveViewPtr m_ipPageLayout;