MFC程序第一次运行时总要提示 “切换到” 解决方案

 在要出现提示的代码前添加如下代码:

    AfxOleGetMessageFilter()->EnableBusyDialog(FALSE);

    AfxOleGetMessageFilter()->SetBusyReply(SERVERCALL_RETRYLATER);

    AfxOleGetMessageFilter()->EnableNotRespondingDialog(TRUE);
    AfxOleGetMessageFilter()->SetMessagePendingDelay(-1);;