newntui/commonresources/src/filterwizard.cpp
//-----------------------------------------------------------------------------------------
// Fills the possible token operations getting attribute type from the 
// selected entry in the attributes combo by referencing to the m_AttributesTable
// array.
//-----------------------------------------------------------------------------------------
Fills the possible token operations getting attribute type from the
selected entry in the attributes combo by referencing to the m_AttributesTable
array.
Fills the possible token operations getting attribute type from the selected entry in the attributes combo by referencing to the m_AttributesTable array .
void CFilterWizard::FillOperationsCombo(void) {
register i;
int attrSelected;
int attrIndex;
COperationEntry entry;
int reference;
    attrSelected=m_AttributeCombo.GetCurSel();
	if(attrSelected==-1) return;
	m_OperationCombo.ResetContent();
    m_OperationsTable.RemoveAll();
	attrIndex=m_AttributeCombo.GetItemData(attrSelected); 
	switch(m_AttributesTable[attrIndex].Type) {
	   case INT_TYPE: for(i=0;i<6;i++) {
	                      entry.Name.LoadString(IDS_OP_INT+i);
	                      entry.FormatString.LoadString(IDS_FMT_INT+i);
	                      reference = m_OperationsTable.Add(entry);
	                      m_OperationCombo.SetItemData(m_OperationCombo.AddString(entry.Name),reference); 
                      }
                      break; 
	   case STR_TYPE: for(i=0;i<5;i++) {
	                      entry.Name.LoadString(IDS_OP_STR+i);
	                      entry.FormatString.LoadString(IDS_FMT_STR+i);
	                      reference = m_OperationsTable.Add(entry);
	                      m_OperationCombo.SetItemData(m_OperationCombo.AddString(entry.Name),reference); 
					  }
		              break;
	}
	m_OperationCombo.SetCurSel(0);
}
void CFilterWizard :: FillOperationsCombo ( void ) { register i ; int attrSelected ; int attrIndex ; COperationEntry entry ; int reference ; attrSelected = m_AttributeCombo . GetCurSel ( ) ; if ( attrSelected == -1 ) return ; m_OperationCombo . ResetContent ( ) ; m_OperationsTable . RemoveAll ( ) ; attrIndex = m_AttributeCombo . GetItemData ( attrSelected ) ; switch ( m_AttributesTable [ attrIndex ] . Type ) { case INT_TYPE : for ( i = 0 ; i < 6 ; i ++ ) { entry . Name . LoadString ( IDS_OP_INT + i ) ; entry . FormatString . LoadString ( IDS_FMT_INT + i ) ; reference = m_OperationsTable . Add ( entry ) ; m_OperationCombo . SetItemData ( m_OperationCombo . AddString ( entry . Name ) , reference ) ; } break ; case STR_TYPE : for ( i = 0 ; i < 5 ; i ++ ) { entry . Name . LoadString ( IDS_OP_STR + i ) ; entry . FormatString . LoadString ( IDS_FMT_STR + i ) ; reference = m_OperationsTable . Add ( entry ) ; m_OperationCombo . SetItemData ( m_OperationCombo . AddString ( entry . Name ) , reference ) ; } break ; } m_OperationCombo . SetCurSel ( 0 ) ; }
Fills the possible token operations getting attribute type from the
selected entry in the attributes combo by referencing to the m_AttributesTable
array.
Fills the possible token operations getting attribute type from the selected entry in the attributes combo by referencing to the m_AttributesTable array .