NX 树控件中文乱码
参考这位
清风徐来 大师的
API
NXOpen::BlockStyler::Node * CreateNode (const NXString &displayText)
Creates the node but does not insert it. More…
NXOpen::BlockStyler::Node * CreateNode (const char *displayText)
Creates the node but does not insert it. More…
void DeleteNode (NXOpen::BlockStyler::Node *node)
Deletes the node from tree. More…
部分传入参数使用char*,造成乱码,如:“拼图”“位”等汉字,传入参数换成 NXString,解决这个问题
实列代码
failcode = UF_UGMGR_ask_folder_name(pTagsContents[i], strFolderNameTemp);
if (!failcode){
NXString strFolderNameTemp_NXS = strFolderNameTemp;
Node* newNode = tree_control02->CreateNode(strFolderNameTemp_NXS);
tree_control02->InsertNode(newNode, ParentNode, NULL, Tree::NodeInsertOptionLast);
}