I am trying to handle the 'Cancel' button in my property pages (wizard) and I've implemented the 'OnQueryCancel' function to catch the cancel message successfully, but unfortunately it seems that the 'OnQueryCancel' function is being called twice if the user clicked the cancel button. Any ideas on how I could address this issue? Thanks!
virtual BOOL OnQueryCancel();
BOOL CWiz_Page1::OnQueryCancel()
{
int ret;
ret = MessageBox("Are you sure?", NULL, MB_YESNO);
if(ret == IDYES)
return true;
else
return false;
}