newntui/commonresources/src/attributesdialog.cpp
//-----------------------------------------------------------------------------------------
// Callabck runs when Cancel button pressed.
//-----------------------------------------------------------------------------------------
Callabck runs when Cancel button pressed.
Callabck runs when Cancel button pressed .
void CAttributesDialog::OnCancel()  {
CString readableName;
CString accessName;
   if(m_QueryResults!=NULL) {
      if(m_RefillOnCancel==TRUE) {
         for(register i=0;i<27;i++) { 
	         readableName.LoadString(IDS_FILE_COLUMN+i);
	         accessName.LoadString(IDS_FILE_COMMAND+i);
             m_QueryResults->RemoveAttribute(readableName,accessName);
         }
         FillListFromInitialState();
	     m_QueryResults->ApplyAttributeChanges();
      } else {
	     if(m_Durty == TRUE ) m_QueryResults->CancelAttributeChanges();
	     m_Durty=FALSE;
      }
   }
   CDialog::OnCancel();
}
void CAttributesDialog :: OnCancel ( ) { CString readableName ; CString accessName ; if ( m_QueryResults != NULL ) { if ( m_RefillOnCancel == TRUE ) { for ( register i = 0 ; i < 27 ; i ++ ) { readableName . LoadString ( IDS_FILE_COLUMN + i ) ; accessName . LoadString ( IDS_FILE_COMMAND + i ) ; m_QueryResults -> RemoveAttribute ( readableName , accessName ) ; } FillListFromInitialState ( ) ; m_QueryResults -> ApplyAttributeChanges ( ) ; } else { if ( m_Durty == TRUE ) m_QueryResults -> CancelAttributeChanges ( ) ; m_Durty = FALSE ; } } CDialog :: OnCancel ( ) ; }
Callabck runs when Cancel button pressed.
Callabck runs when Cancel button pressed .