I have issues with my code below: The problem occurs at the point of assignment: _tiles = m_map.get_Tiles();
Can anybody assist me to know what may be wrong?
#pragma region PopulateProvidersCombo
ITilesPtr _tiles;
_tiles.CreateInstance(__uuidof(Tiles));
_tiles = m_map.get_Tiles();
ITileProvidersPtr _TileProviders;
_TileProviders.CreateInstance(__uuidof(TileProviders));
_TileProviders = _tiles->Providers;
CMFCRibbonComboBox* pComboBox = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, m_pWnd->m_wndRibbonBar.FindByID(ID_TOOLS_TILEPROVIDER));
pComboBox->RemoveAllItems();
for (int i = 0; i < _TileProviders->Count; i++)
{
pComboBox->AddItem((_bstr_t)_TileProviders->GetName(i));
}
#pragma endregion
I have not seen any post that addressed the issue. Any assistance is appreciated.
Thank you.