频繁调用CDialogBuilder的create接口创建同一个配置文件,会报异常;
正常的处理方式如下:
if (!m_dlgBuilder.GetMarkup()->IsValid())
{
pElement = static_cast<CListContainerElementUI*>(m_dlgBuilder.Create(_T("FriendListItem.xml"), \
(UINT)0, NULL, &m_PaintManager));
}
else
{
pElement = static_cast<CListContainerElementUI*>(m_dlgBuilder.Create(NULL, &m_PaintManager));
}