newntui/discovermdi/src/dockablebrowser.cpp
//----------------------------------------------------------------------------------------
// This callback will run every time the user select some query in the browser. It will
// use DiscoverSelection server variable as an query argument if something selected
// and m_SelectionAvailable flag is set to TRUE or current project if no selection 
// available. It will use "FormQueryRequest" function to form complex query from the
// given queries names.
//----------------------------------------------------------------------------------------
This callback will run every time the user select some query in the browser. It will
use DiscoverSelection server variable as an query argument if something selected
and m_SelectionAvailable flag is set to TRUE or current project if no selection
available. It will use "FormQueryRequest" function to form complex query from the
given queries names.
This callback will run every time the user select some query in the browser . It will use DiscoverSelection server variable as an query argument if something selected and m_SelectionAvailable flag is set to TRUE or current project if no selection available . It will use " FormQueryRequest " function to form complex query from the given queries names .
void CDockableBrowser::OnQueryChanged(LPCTSTR parmsList) {
CMainFrame* main=(CMainFrame*) AfxGetMainWnd();
CCategoriesCombo* Category = (CCategoriesCombo *) GetDlgItem(IDC_CATEGORIES);
CQueriesCombo* Query = (CQueriesCombo *) GetDlgItem(IDC_QUERIES);
CQueryResults* Results  = (CQueryResults *) GetDlgItem(IDC_RESULTS);
    if(main->m_SelectionSize>0) {
        HCURSOR save = ::SetCursor(::LoadCursor(NULL, IDC_WAIT));
        Category->Unselect();
	    m_CurrentQuery=parmsList;
	    FormQueryRequest(CString(parmsList));
	    Results->SetQuery(m_QueryRequest);
	    Results->Update();
        CString sizeStr = ExecuteCommand(CString("size $DiscoverSelection"));
        main->m_SelectionSize=atoi(sizeStr);
        DisplayInfoString();
        SaveHistory();
		::SetCursor(save);
	} else Query->Clear();
}
void CDockableBrowser :: OnQueryChanged ( LPCTSTR parmsList ) { CMainFrame * main = ( CMainFrame * ) AfxGetMainWnd ( ) ; CCategoriesCombo * Category = ( CCategoriesCombo * ) GetDlgItem ( IDC_CATEGORIES ) ; CQueriesCombo * Query = ( CQueriesCombo * ) GetDlgItem ( IDC_QUERIES ) ; CQueryResults * Results = ( CQueryResults * ) GetDlgItem ( IDC_RESULTS ) ; if ( main -> m_SelectionSize > 0 ) { HCURSOR save = :: SetCursor ( :: LoadCursor ( NULL , IDC_WAIT ) ) ; Category -> Unselect ( ) ; m_CurrentQuery = parmsList ; FormQueryRequest ( CString ( parmsList ) ) ; Results -> SetQuery ( m_QueryRequest ) ; Results -> Update ( ) ; CString sizeStr = ExecuteCommand ( CString ( " " ) ) ; main -> m_SelectionSize = atoi ( sizeStr ) ; DisplayInfoString ( ) ; SaveHistory ( ) ; :: SetCursor ( save ) ; } else Query -> Clear ( ) ; }
This callback will run every time the user select some query in the browser.
This callback will run every time the user select some query in the browser .