[英]Exit out of a CPropertySheet Wizard
I have a C++ application that is a Wizard. 我有一个向导向导的C ++应用程序。 During the application it detects if certain hardware is installed.
在应用程序期间,它将检测是否安装了某些硬件。 If it is not, it pops up a AFXMessage that asks if the user wants to retry or quit.
如果不是,它将弹出一个AFXMessage,询问用户是否要重试或退出。 I have the retry part working but can not figure out to just exit out of the application.
我有重试部分工作,但不能弄清楚只是退出应用程序。 I can have it go to the finish page, but I need it to just quit the application.
我可以将其转到完成页面,但是我需要它才能退出应用程序。
The class checks for the hardware in the OnSetActiveDelayed call. 该类检查OnSetActiveDelayed调用中的硬件。 If I do a QueryClose call it returns back to the base class but does not exit.
如果我执行QueryClose调用,它将返回到基类,但不会退出。 Should I have it call OnQueryCancel instead?
我应该改为调用OnQueryCancel吗?
From MSDN Documentation : 从MSDN文档 :
Even though CPropertySheet is not derived from CDialog, managing a CPropertySheet object is like managing a CDialog object
即使CPropertySheet不是从CDialog派生的,管理CPropertySheet对象就像管理CDialog对象一样
To quit the wizard, just call the property sheet EndDialog()
function, like 要退出向导,只需调用属性表
EndDialog()
函数,例如
m_pPropertySheet->EndDialog(IDCANCEL);
where m_pPropertySheet
is a pointer to your CPropertySheet derived class instance. 其中
m_pPropertySheet
是指向CPropertySheet派生类实例的指针。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.