CommonMessagePump.IVsCommonMessagePump.SetAllowCancel(Boolean) 方法

定义

确定等待对话框是否有启用的 "取消" 按钮。

 virtual int Microsoft.VisualStudio.Shell.Interop.IVsCommonMessagePump.SetAllowCancel(bool allowCancel) = Microsoft::VisualStudio::Shell::Interop::IVsCommonMessagePump::SetAllowCancel;
 virtual int Microsoft.VisualStudio.Shell.Interop.IVsCommonMessagePump.SetAllowCancel(bool allowCancel) = Microsoft::VisualStudio::Shell::Interop::IVsCommonMessagePump::SetAllowCancel;
int Microsoft.VisualStudio.Shell.Interop.IVsCommonMessagePump.SetAllowCancel(bool allowCancel);
int IVsCommonMessagePump.SetAllowCancel (bool allowCancel);
abstract member Microsoft.VisualStudio.Shell.Interop.IVsCommonMessagePump.SetAllowCancel : bool -> int
override this.Microsoft.VisualStudio.Shell.Interop.IVsCommonMessagePump.SetAllowCancel : bool -> int
Function SetAllowCancel (allowCancel As Boolean) As Integer Implements IVsCommonMessagePump.SetAllowCancel

参数

allowCancel
Boolean

true 如果等待对话框具有已启用的 "取消" 按钮,则为; 否则为 false

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

实现

注解

这可以在调用 ModalWaitForHandles 之前或在 ModalWaitForHandlesWithClient 中的某个回调期间设置。

适用于