newntui/discovermdi/src/disgraphnode.cpp
//------------------------------------------------------------------------------------
// This method will search in the items list to locate the item
// with the selected id. It will return the number of this item (
// starting from list head) or -1 if no such field in the list.
//------------------------------------------------------------------------------------
This method will search in the items list to locate the item
with the selected id. It will return the number of this item (
starting from list head) or -1 if no such field in the list.
This method will search in the items list to locate the item with the selected id . It will return the number of this item ( starting from list head ) or - 1 if no such field in the list .
int CDisGraphNode::FindFieldNumber(int id) {
int num=0;
	POSITION pos = m_FieldsList.GetHeadPosition();
	while(pos) {
		if(m_FieldsList.GetAt(pos).m_FieldID==id) return num;
		num++;
		m_FieldsList.GetNext(pos);
	}
	return -1;
}
int CDisGraphNode :: FindFieldNumber ( int id ) { int num = 0 ; POSITION pos = m_FieldsList . GetHeadPosition ( ) ; while ( pos ) { if ( m_FieldsList . GetAt ( pos ) . m_FieldID == id ) return num ; num ++ ; m_FieldsList . GetNext ( pos ) ; } return -1 ; }
This method will search in the items list to locate the item
with the selected id.
This method will search in the items list to locate the item with the selected id .