newntui/discovermdi/src/dockablebrowser.cpp
//----------------------------------------------------------------------------
// This function will create menu map from the current query string.
//----------------------------------------------------------------------------
This function will create menu map from the current query string.
This function will create menu map from the current query string .
void CDockableBrowser::MakeMenuMap() {
CString queryName;
register i;
	m_MenuMap.RemoveAll();
    CQueriesCombo*      Query;
    Query=(CQueriesCombo*) GetDlgItem(IDC_QUERIES);
	CString list = Query->GetQueriesList();
	int count=IDC_QUERIES_START;
	BOOL in=FALSE;
	for(i=0;i<list.GetLength();i++) {
		if(list[i]=='{') {
			in=TRUE;
			continue;
		}
		if(list[i]=='}') {
			in=FALSE;
			queryName.TrimLeft();
			queryName.TrimRight();
			CMenuMapEntry entry;
			entry.m_ID=count;
			entry.m_Query=queryName;
			m_MenuMap.AddTail(entry);
			queryName="";
			count++;
			continue;
		}
		if(in) queryName+=list[i];
	}
}
void CDockableBrowser :: MakeMenuMap ( ) { CString queryName ; register i ; m_MenuMap . RemoveAll ( ) ; CQueriesCombo * Query ; Query = ( CQueriesCombo * ) GetDlgItem ( IDC_QUERIES ) ; CString list = Query -> GetQueriesList ( ) ; int count = IDC_QUERIES_START ; BOOL in = FALSE ; for ( i = 0 ; i < list . GetLength ( ) ; i ++ ) { if ( list [ i ] == ' ' ) { in = TRUE ; continue ; } if ( list [ i ] == ' ' ) { in = FALSE ; queryName . TrimLeft ( ) ; queryName . TrimRight ( ) ; CMenuMapEntry entry ; entry . m_ID = count ; entry . m_Query = queryName ; m_MenuMap . AddTail ( entry ) ; queryName = " " ; count ++ ; continue ; } if ( in ) queryName += list [ i ] ; } }
This function will create menu map from the current query string.
This function will create menu map from the current query string .