newntui/commonresources/src/filterwizard.cpp
//----------------------------------------------------------------------------------------
// Callabck will run when user press Apply button
// If this page is active, we will use it's command to filter list.
// If this page is not active, we will use current command stored in the parent to
// filter our list.
//----------------------------------------------------------------------------------------
Callabck will run when user press Apply button
If this page is active, we will use it's command to filter list.
If this page is not active, we will use current command stored in the parent to
filter our list.
Callabck will run when user press Apply button If this page is active we will use it ' s command to filter list . If this page is not active we will use current command stored in the parent to filter our list .
BOOL CFilterWizard::OnApply()  {
FilterSheet* parent;
    parent=(FilterSheet *)GetParent();
	if(parent->GetActiveIndex()==1) {
		UpdateParentName();
        CQueryResults* ctrl;
        ctrl=parent->m_QueryResults;
	    if(ctrl!=NULL) {
	       CString filterQuery;
	       if(parent->m_Command.GetLength()>0) 
			   filterQuery.Format("filter {%s}",parent->m_Command);
	       else  
			   filterQuery=""; 
           ctrl->SetFilter(filterQuery);
           ctrl->Update();
		}
	}
	return CPropertyPage::OnApply();
}
BOOL CFilterWizard :: OnApply ( ) { FilterSheet * parent ; parent = ( FilterSheet * ) GetParent ( ) ; if ( parent -> GetActiveIndex ( ) == 1 ) { UpdateParentName ( ) ; CQueryResults * ctrl ; ctrl = parent -> m_QueryResults ; if ( ctrl != NULL ) { CString filterQuery ; if ( parent -> m_Command . GetLength ( ) > 0 ) filterQuery . Format ( " " , parent -> m_Command ) ; else filterQuery = " " ; ctrl -> SetFilter ( filterQuery ) ; ctrl -> Update ( ) ; } } return CPropertyPage :: OnApply ( ) ; }
Callabck will run when user press Apply button
If this page is active, we will use it's command to filter list.
Callabck will run when user press Apply button If this page is active we will use it ' s command to filter list .