newntui/activex/tabselector/src/tabselectorctl.cpp
//------------------------------------------------------------------------------------------
// Enables or disables elements according tab selection.
//------------------------------------------------------------------------------------------
Enables or disables elements according tab selection.
Enables or disables elements according tab selection .
void CTabSelectorCtrl::OnSelchangeTab(NMHDR* pNMHDR, LRESULT* pResult)  {
int sel = m_Tab.GetCurSel();
	switch(sel) {
	   case 0 : m_Queries.ShowWindow(SW_HIDE); 
		        m_Groups.ShowWindow(SW_HIDE); 
				m_Categories.ShowWindow(SW_SHOW);
				FireModeChanged(0);
		        break;
	   case 1 : m_Categories.ShowWindow(SW_HIDE); 
		        m_Groups.ShowWindow(SW_HIDE); 
		        m_Queries.ShowWindow(SW_SHOW); 
				FireModeChanged(1);
				break;
	   case 2 : m_Categories.ShowWindow(SW_HIDE); 
		        m_Queries.ShowWindow(SW_HIDE); 
		        m_Groups.ShowWindow(SW_SHOW); 
				FireModeChanged(2);
				break;
	}
	*pResult = 0;
}
void CTabSelectorCtrl :: OnSelchangeTab ( NMHDR * pNMHDR , LRESULT * pResult ) { int sel = m_Tab . GetCurSel ( ) ; switch ( sel ) { case 0 : m_Queries . ShowWindow ( SW_HIDE ) ; m_Groups . ShowWindow ( SW_HIDE ) ; m_Categories . ShowWindow ( SW_SHOW ) ; FireModeChanged ( 0 ) ; break ; case 1 : m_Categories . ShowWindow ( SW_HIDE ) ; m_Groups . ShowWindow ( SW_HIDE ) ; m_Queries . ShowWindow ( SW_SHOW ) ; FireModeChanged ( 1 ) ; break ; case 2 : m_Categories . ShowWindow ( SW_HIDE ) ; m_Queries . ShowWindow ( SW_HIDE ) ; m_Groups . ShowWindow ( SW_SHOW ) ; FireModeChanged ( 2 ) ; break ; } * pResult = 0 ; }
Enables or disables elements according tab selection.
Enables or disables elements according tab selection .