Get the tree node that represents a specified ini section.
TreeNode tree_get_ini_section( TreeNode & trIni, LPCSTR lpcszSection )
If a tree node representing the specified ini section then it is returned, else an invalid tree node is returned.
EX1
void tree_get_ini_section_ex1() { Tree tr; StringArray saSections; string strFileName = okutil_get_origin_path(USER_FOLDER) +"NLSF.ini"; if (!strFileName.IsFile() ) { out_str("File isn't exist! Please check it!"); return; } INIFile iniFile(strFileName, TRUE); iniFile.GetSectionNames(saSections); if( tree_read_ini(tr, iniFile) ) { TreeNode tn; int nSize = saSections.GetSize(); for( int ii = 0; ii < nSize; ii++ ) { tn = tree_get_ini_section(tr, saSections[0]); if( tn ) out_tree(tn); else out_str("No"); } } }
tree_read_ini
origin.h