newntui/discovermdi/src/dockablebrowser.cpp
//----------------------------------------------------------------------------
// This callbac will run every time the user changed the node in the project 
// tree. We need to inform our browsers about this.
//----------------------------------------------------------------------------
This callbac will run every time the user changed the node in the project
tree. We need to inform our browsers about this.
This callbac will run every time the user changed the node in the project tree . We need to inform our browsers about this .
void CDockableBrowser::OnNodeChanged(LPCTSTR projectName)  {
    HCURSOR save = ::SetCursor(::LoadCursor(NULL, IDC_WAIT));
    CCategoriesCombo* Category = (CCategoriesCombo *) GetDlgItem(IDC_CATEGORIES);
	Category->Unselect();
	m_CurrentProject=projectName;
	CQueryResults* Results  = (CQueryResults *) GetDlgItem(IDC_RESULTS);
	CString query;
	query.Format("modules %s",m_CurrentProject);
	Results->SetQuery(query);
	Results->Update();
    DisplayInfoString();
    CString sizeStr = ExecuteCommand(CString("size $DiscoverSelection"));
    CMainFrame* main=(CMainFrame*) AfxGetMainWnd();
    main->m_SelectionSize=atoi(sizeStr);
    SaveHistory(query);
	::SetCursor(save);
}
void CDockableBrowser :: OnNodeChanged ( LPCTSTR projectName ) { HCURSOR save = :: SetCursor ( :: LoadCursor ( NULL , IDC_WAIT ) ) ; CCategoriesCombo * Category = ( CCategoriesCombo * ) GetDlgItem ( IDC_CATEGORIES ) ; Category -> Unselect ( ) ; m_CurrentProject = projectName ; CQueryResults * Results = ( CQueryResults * ) GetDlgItem ( IDC_RESULTS ) ; CString query ; query . Format ( " " , m_CurrentProject ) ; Results -> SetQuery ( query ) ; Results -> Update ( ) ; DisplayInfoString ( ) ; CString sizeStr = ExecuteCommand ( CString ( " " ) ) ; CMainFrame * main = ( CMainFrame * ) AfxGetMainWnd ( ) ; main -> m_SelectionSize = atoi ( sizeStr ) ; SaveHistory ( query ) ; :: SetCursor ( save ) ; }
This callbac will run every time the user changed the node in the project
tree.
This callbac will run every time the user changed the node in the project tree .