CPropertyPage::OnQueryCancel

Questa funzione membro viene chiamata dal framework quando l'utente fa clic sul pulsante Annulla e prima che l'operazione di annullamento abbia avuto luogo.

virtual BOOL OnQueryCancel( );

Valore restituito

Restituisce FALSE per impedire che durante l'operazione o TRUE cancel per permetterla.

Note

Eseguire l'override della funzione membro per specificare le azioni che il programma ha quando l'utente fa clic sul pulsante Annulla.

L'implementazione predefinita di restituisce TRUEdi OnQueryCancel.

Esempio

// Query the user whether to abort the changes if the new selected
// color (m_Color) is different from the initial color 
// (m_InitialColor) when the CPropertySheet dialog is first shown.
// CColorPage is a CPropertyPage-derived class.
BOOL CColorPage::OnQueryCancel() 
{
   if (m_InitialColor != m_Color)
   {
      if (AfxMessageBox(_T("Abort the changes?"), MB_YESNO) == IDNO)
         return FALSE;  
   }

   return CPropertyPage::OnQueryCancel();
}

Requisiti

Header: afxdlgs.h

Vedere anche

Riferimenti

Classe di CPropertyPage

Grafico della gerarchia