newntui/activex/tabselector/src/tabselectorctl.cpp
//------------------------------------------------------------------------------------------
// This method will return the access command from the category name. Will return empty
// string if no access command associated with the given name.
//------------------------------------------------------------------------------------------
This method will return the access command from the category name. Will return empty
string if no access command associated with the given name.
This method will return the access command from the category name . Will return empty string if no access command associated with the given name .
BSTR CTabSelectorCtrl::AccessFromName(LPCTSTR name)  {
CString access;
	switch(m_Tab.GetCurSel()) {
	   case 0 : access=m_Categories.AccessFromName(name);
		        break;
	   case 1 : access=m_Queries.AccessFromName(name);
				break;
	   case 2 : access=m_Queries.AccessFromName(name);
				break;
	}
   return access.AllocSysString();
}
BSTR CTabSelectorCtrl :: AccessFromName ( LPCTSTR name ) { CString access ; switch ( m_Tab . GetCurSel ( ) ) { case 0 : access = m_Categories . AccessFromName ( name ) ; break ; case 1 : access = m_Queries . AccessFromName ( name ) ; break ; case 2 : access = m_Queries . AccessFromName ( name ) ; break ; } return access . AllocSysString ( ) ; }
This method will return the access command from the category name.
This method will return the access command from the category name .