Share via


CPropertyPage::OnQueryCancel

Esta función miembro llaman el marco cuando el usuario hace clic en el botón Cancelar y antes de que se han producido acción de cancelación.

virtual BOOL OnQueryCancel( );

Valor devuelto

Devuelve FALSO para evitar la operación de cancelación o el TRUE para permitirlo.

Comentarios

Invalide esta función miembro para especificar una acción que el programa toma cuando el usuario hace clic en el botón cancel.

la implementación predeterminada de OnQueryCancel devuelve TRUE.

Ejemplo

// 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();
}

Requisitos

encabezado: afxdlgs.h

Vea también

Referencia

Clase de CPropertyPage

Gráfico de jerarquía