newntui/discovermdi/src/dockablebrowser.cpp
//----------------------------------------------------------------------------------------
// This callback will run every time the user changed the selected categories list. This 
// callback will convert the readable categories list receved from the categories
// ActiveX into the access commands (this is done by FormCategoryRequest function), will
// fill the results window withthe results and will pass the categories list to the 
// queries Active X control to let it form a query subset based on the selected 
// categories.
//----------------------------------------------------------------------------------------
This callback will run every time the user changed the selected categories list. This
callback will convert the readable categories list receved from the categories
ActiveX into the access commands (this is done by FormCategoryRequest function), will
fill the results window withthe results and will pass the categories list to the
queries Active X control to let it form a query subset based on the selected
categories.
This callback will run every time the user changed the selected categories list . This callback will convert the readable categories list receved from the categories ActiveX into the access commands ( this is done by FormCategoryRequest function ) will fill the results window withthe results and will pass the categories list to the queries Active X control to let it form a query subset based on the selected categories .
void CDockableBrowser::OnCategoryChanged(LPCTSTR categoriesList) {
CString query;
   HCURSOR save = ::SetCursor(::LoadCursor(NULL, IDC_WAIT));
   m_CurrentCategory = categoriesList;
   FormCategoryRequest(CString(categoriesList));
   query.Format("%s %s",m_CategoryRequest, m_CurrentProject);
   CQueryResults* Results  = (CQueryResults *) GetDlgItem(IDC_RESULTS);
   Results->SetQuery(query);
   Results->Update();
   CQueriesCombo*      Query;
   Query=(CQueriesCombo*) GetDlgItem(IDC_QUERIES);
   Query->SetSelection("");
   Query->SetCategories(categoriesList);
   DisplayInfoString();
   CString sizeStr = ExecuteCommand(CString("size $DiscoverSelection"));
   CMainFrame* main=(CMainFrame*) AfxGetMainWnd();
   main->m_SelectionSize=atoi(sizeStr);
   SaveHistory();
   ::SetCursor(save);
}
void CDockableBrowser :: OnCategoryChanged ( LPCTSTR categoriesList ) { CString query ; HCURSOR save = :: SetCursor ( :: LoadCursor ( NULL , IDC_WAIT ) ) ; m_CurrentCategory = categoriesList ; FormCategoryRequest ( CString ( categoriesList ) ) ; query . Format ( " " , m_CategoryRequest , m_CurrentProject ) ; CQueryResults * Results = ( CQueryResults * ) GetDlgItem ( IDC_RESULTS ) ; Results -> SetQuery ( query ) ; Results -> Update ( ) ; CQueriesCombo * Query ; Query = ( CQueriesCombo * ) GetDlgItem ( IDC_QUERIES ) ; Query -> SetSelection ( " " ) ; Query -> SetCategories ( categoriesList ) ; DisplayInfoString ( ) ; CString sizeStr = ExecuteCommand ( CString ( " " ) ) ; CMainFrame * main = ( CMainFrame * ) AfxGetMainWnd ( ) ; main -> m_SelectionSize = atoi ( sizeStr ) ; SaveHistory ( ) ; :: SetCursor ( save ) ; }
This callback will run every time the user changed the selected categories list.
This callback will run every time the user changed the selected categories list .