다음을 통해 공유


CPropertyPage::OnQueryCancel

이 멤버 함수는 프레임 워크에서 사용자가 취소 단추를 클릭 하 고 취소 하기 전에 조치를 수행한 경우 호출 됩니다.

virtual BOOL OnQueryCancel( );

반환 값

반환 거짓 작업을 취소 하거나 허용 하는 TRUE를 방지 하기 위해.

설명

취소 단추를 클릭할 때 프로그램을 사용 하는 동작을 지정 하려면이 멤버 함수를 재정의 합니다.

기본 구현 된 OnQueryCancel 반환 TRUE.

예제

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

요구 사항

헤더: afxdlgs.h

참고 항목

참조

CPropertyPage 클래스

계층 구조 차트