好的,这有什么问题?
void CMFCApplication1Dlg::OnBnClickedOk()
{
std::vector<std::string> vectorList;
try
{
CMSAToolsLibraryWrapper wrapper;
__int64 lResult = wrapper.SetDatabasePath(std::string("d:\\Test.xml"));
__int64 iNumPublishersRead = 0;
if (wrapper.ReadPublisherData(iNumPublishersRead))
{
vectorList = wrapper.GetPersonnelNames(true);
for (std::string& strName : vectorList)
{
m_lbNames.AddString((LPCTSTR)strName.c_str());
}
}
}
catch(_com_error *e)
{
AfxMessageBox(_T("Problem"));
}
//CDialogEx::OnOK();
}
AddString
如果我在调用 上放置一个断点,则该strName
值是正确的。但我的CListBox
结局是汉字。为什么 ?