newntui/activex/queriescombo/src/queriescomboctl.cpp
//-----------------------------------------------------------------------------------
// Query server for the queries list. Fills the list with returned queries.
//----------------------------------------------------------------------------------- 
Query server for the queries list. Fills the list with returned queries.
Query server for the queries list . Fills the list with returned queries .
void CQueriesComboCtrl::FillList(void) {
register i;
    m_ListView.DeleteAllItems();
	int     line   = 0;
	BOOL    inside = FALSE;
	CString name   ="";
	for(i=0;i<m_QueriesList.GetLength();i++) {
		if(m_QueriesList[i]=='{') {
			inside=TRUE;
			name="";
			continue;
		}
		if(m_QueriesList[i]=='}') {
			inside=FALSE;
	        m_ListView.InsertItem(i,name,0);
			continue;
		}
		if(inside==TRUE) {
		    name+=m_QueriesList[i];
		}
	}
}
void CQueriesComboCtrl :: FillList ( void ) { register i ; m_ListView . DeleteAllItems ( ) ; int line = 0 ; BOOL inside = FALSE ; CString name = " " ; for ( i = 0 ; i < m_QueriesList . GetLength ( ) ; i ++ ) { if ( m_QueriesList [ i ] == ' ' ) { inside = TRUE ; name = " " ; continue ; } if ( m_QueriesList [ i ] == ' ' ) { inside = FALSE ; m_ListView . InsertItem ( i , name , 0 ) ; continue ; } if ( inside == TRUE ) { name += m_QueriesList [ i ] ; } } }
Query server for the queries list.
Query server for the queries list .
// Now we will fill the list with queries names, extracting them from the "serverResults" // Entering query substring // Exiting query substring - need to insert results into the list // Inserting new item into the list