newntui/activex/groupscombo/src/groupscomboctl.cpp
//----------------------------------------------------------------------------------
// Callback runs when the editor send WM_USERSELECTION event. Forms the group names
// string with groups separated by {} and sends this string to the container.
//----------------------------------------------------------------------------------
Callback runs when the editor send WM_USERSELECTION event. Forms the group names
string with groups separated by {} and sends this string to the container.
Callback runs when the editor send WM_USERSELECTION event . Forms the group names string with groups separated by {} and sends this string to the container .
LRESULT CGroupsComboCtrl::OnUserSelection(WPARAM,LPARAM) {
	if(m_InSelection==TRUE) {
        HCURSOR save = ::SetCursor(::LoadCursor(NULL, IDC_WAIT));
        m_GroupsList="";
	    for(register i=0; i<m_ElementsList.GetItemCount();i++) {
		   if(m_ElementsList.GetItemState(i,LVIS_SELECTED)!=0) {
		      m_GroupsList+="{";
			  m_GroupsList+=m_ElementsList.GetItemText(i,0);
			  m_GroupsList+='}';
		   }
		}
		FillElementsList();
		FireGroupChanged(m_GroupsList);
	    m_InSelection=FALSE;
		SetToolbarStatus();
		::SetCursor(save);
	}
	return 0;
}
LRESULT CGroupsComboCtrl :: OnUserSelection ( WPARAM , LPARAM ) { if ( m_InSelection == TRUE ) { HCURSOR save = :: SetCursor ( :: LoadCursor ( NULL , IDC_WAIT ) ) ; m_GroupsList = " " ; for ( register i = 0 ; i < m_ElementsList . GetItemCount ( ) ; i ++ ) { if ( m_ElementsList . GetItemState ( i , LVIS_SELECTED ) != 0 ) { m_GroupsList += " " ; m_GroupsList += m_ElementsList . GetItemText ( i , 0 ) ; m_GroupsList += ' ' ; } } FillElementsList ( ) ; FireGroupChanged ( m_GroupsList ) ; m_InSelection = FALSE ; SetToolbarStatus ( ) ; :: SetCursor ( save ) ; } return 0 ; }
Callback runs when the editor send WM_USERSELECTION event.
Callback runs when the editor send WM_USERSELECTION event .