C2668 ambiguous call to overloaded function的问题 5
voidCLeftView::OnInitialUpdate(){CTreeView::OnInitialUpdate();m_pImageList=newCImageL...
void CLeftView::OnInitialUpdate()
{
CTreeView::OnInitialUpdate();
m_pImageList = new CImageList();
CWinApp* pApp = AfxGetApp();
// ASSERT(m_pImageList != NULL); // serious allocation failure checking
m_pImageList->Create(16, 16, ILC_COLOR8 | ILC_MASK, 9, 9);
m_pImageList->Add(pApp->LoadIcon(ILI_CDDRV));
m_pImageList->Add(pApp->LoadIcon(ILI_CLSDFLD));
m_pImageList->Add(pApp->LoadIcon(ILI_DRIVE));
m_pImageList->Add(pApp->LoadIcon(ILI_FLOPPYDRV));
m_pImageList->Add(pApp->LoadIcon(ILI_MYCOMP));
m_pImageList->Add(pApp->LoadIcon(ILI_OPENFLD));
m_pImageList->Add(pApp->LoadIcon(ILI_TEXTFILE));
GetTreeCtrl().SetImageList(m_pImageList , TVSIL_NORMAL);
HTREEITEM hParent = GetTreeCtrl().InsertItem(MYCOMPUTER,ILI_MYCOMP, ILI_MYCOMP);
InitTreeView(hParent);
GetTreeCtrl().Expand(hParent, TVE_EXPAND);
}
提示error C2668: 'LoadIconA' : ambiguous call to overloaded function出现错误
请问应该怎么办? 展开
{
CTreeView::OnInitialUpdate();
m_pImageList = new CImageList();
CWinApp* pApp = AfxGetApp();
// ASSERT(m_pImageList != NULL); // serious allocation failure checking
m_pImageList->Create(16, 16, ILC_COLOR8 | ILC_MASK, 9, 9);
m_pImageList->Add(pApp->LoadIcon(ILI_CDDRV));
m_pImageList->Add(pApp->LoadIcon(ILI_CLSDFLD));
m_pImageList->Add(pApp->LoadIcon(ILI_DRIVE));
m_pImageList->Add(pApp->LoadIcon(ILI_FLOPPYDRV));
m_pImageList->Add(pApp->LoadIcon(ILI_MYCOMP));
m_pImageList->Add(pApp->LoadIcon(ILI_OPENFLD));
m_pImageList->Add(pApp->LoadIcon(ILI_TEXTFILE));
GetTreeCtrl().SetImageList(m_pImageList , TVSIL_NORMAL);
HTREEITEM hParent = GetTreeCtrl().InsertItem(MYCOMPUTER,ILI_MYCOMP, ILI_MYCOMP);
InitTreeView(hParent);
GetTreeCtrl().Expand(hParent, TVE_EXPAND);
}
提示error C2668: 'LoadIconA' : ambiguous call to overloaded function出现错误
请问应该怎么办? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询