3

Comunicate between two processes, often pop up boring dialog "This action cannot be completed because the other application is busy.  Choose 'Switch To' to activate the busy application and correct the problem"

Then it offers 3 buttons:  Switch To..., Retry and Cancel.

Could I disable the dialog anyway?

4

1 回答 1

4

当进程间通信调用没有收到服务器的响应并且超时(服务器端操作耗时太长)时,消息框显示在调用方。

如果服务器和客户端都是您的代码,您可以将其重构为以非阻塞方式运行,例如第一个方法调用开始操作并立即返回,然后客户端在完成时轮询更新,或接收回调。否则,在 中MFC,您可以使用 禁用此对话框COleMessageFilter::EnableBusyDialog,请参阅:从 C++ 设置 OLE 请求超时

于 2012-08-17T07:04:04.237 回答