newntui/discovermdi/src/qatree.cpp
//---------------------------------------------------------------------------------------
// This callback will run every time the user changed the selected item.
// We will use it to inform right window about the node which properties 
// we ned to see/edit.
//---------------------------------------------------------------------------------------
This callback will run every time the user changed the selected item.
We will use it to inform right window about the node which properties
we ned to see/edit.
This callback will run every time the user changed the selected item . We will use it to inform right window about the node which properties we ned to see / edit .
void CQATree::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)  {
    HTREEITEM current = m_Tree.GetSelectedItem();
	if(current!=NULL) {
          CTreeNodeInfo* info;
		  info = (CTreeNodeInfo*) m_Tree.GetItemData(current);
		  if(info!=NULL) {
             CQAParams* view;
             view=(CQAParams* )(((CSplitterWnd *)GetParent())->GetPane(0,1));
             view->FillPropertiesOfNode(info->m_NodeName);
			 CQAChildFrame* parent = (CQAChildFrame *)GetParent()->GetParent();
			 parent->SetCurrentSetEnable(view->GetCurrentSetEnable());
		  }
	}
	*pResult = 0;
}
void CQATree :: OnSelchanged ( NMHDR * pNMHDR , LRESULT * pResult ) { HTREEITEM current = m_Tree . GetSelectedItem ( ) ; if ( current != NULL ) { CTreeNodeInfo * info ; info = ( CTreeNodeInfo * ) m_Tree . GetItemData ( current ) ; if ( info != NULL ) { CQAParams * view ; view = ( CQAParams * ) ( ( ( CSplitterWnd * ) GetParent ( ) ) -> GetPane ( 0 , 1 ) ) ; view -> FillPropertiesOfNode ( info -> m_NodeName ) ; CQAChildFrame * parent = ( CQAChildFrame * ) GetParent ( ) -> GetParent ( ) ; parent -> SetCurrentSetEnable ( view -> GetCurrentSetEnable ( ) ) ; } } * pResult = 0 ; }
This callback will run every time the user changed the selected item.
This callback will run every time the user changed the selected item .