TA的每日心情 | 慵懒 4 天前 |
|---|
签到天数: 74 天 [LV.6]常住居民II
管理员
- 积分
- 2252
|
楼主 |
发表于 2026-1-30 15:14:48
|
显示全部楼层
pugi::xml_node xmlTemplate = xmlNode.child(L"template");
if(xmlTemplate)
{
m_xmlTemplate.append_copy(xmlTemplate);
{
//创建一个定位器
STileViewItemLocator* pItemLocator = new STileViewItemLocator(
SOUI::SStringT().Format(_T("%d"), it->second.first),
SOUI::SStringT().Format(_T("%d"), it->second.second),
m_nMarginSize);
SetItemLocator(pItemLocator);
pItemLocator->Release();
}
}
升级到SOUI5之后,写法如下
IXmlNode* xmlTemplate = xmlNode.Child(L"template",FALSE);
if (xmlTemplate)
{
m_xmlTemplate.Reset();
m_xmlTemplate.root().append_copy(xmlTemplate);
{
//创建一个定位器
STileViewItemLocator* pItemLocator = new STileViewItemLocator(this,
SOUI::SStringT().Format(_T("%d"), it->second.first),
SOUI::SStringT().Format(_T("%d"), it->second.second),
m_nMarginSize);
SetItemLocator(pItemLocator);
pItemLocator->Release();
}
} |
|