如何使用 MFC 处理来自 MS Word 拼写检查器的事件?

发布于 2024-10-09 11:08:44 字数 524 浏览 0 评论 0原文

我正在使用 Visual C++ 6.0 在我的应用程序(非托管 C++)中开发拼写检查器实现。我能够访问 MS Word 并使用 MFC 打开它。对于拼写检查,我调用函数:

doc.CheckSpelling(mLocation,m_vOpt,m_vOpt, m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt); 

其中 doc 是从 _application.GetDocuments() 获取的 _Document 对象。

这将打开 MS Word 拼写检查弹出窗口,其中包含建议的单词。

现在,我想处理通过单击 Word 应用程序的拼写检查弹出窗口中的“全部更改”或“全部忽略”按钮创建的事件。

谁能告诉我从 MS Word 处理这些事件的程序?我尝试搜索 MS Word 的事件处理,但所有解决方案都在 .NET 中。我想知道如何在 C++ 应用程序中使用 MFC 来执行此操作。

I am working on a spell checker implementation in my application (unmanaged C++) using Visual C++ 6.0. I am able to access MS Word and open it using MFC. For spell checking, I am calling the function:

doc.CheckSpelling(mLocation,m_vOpt,m_vOpt, m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt,m_vOpt); 

where doc is the object of _Document got from _application.GetDocuments().

This will open up the MS Word spell checking pop-up window with suggested words.

Now, I want to handle the event created by clicking the "Change all" or "Ignore all" buttons present in the spell checking pop-up window of the Word application.

Can anyone tell me the procedure to implement handling of these events from MS Word? I tried searching for event handling for MS Word, however all the solutions are in .NET. I would like to know how to do this using MFC in C++ application.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽你眉间 2024-10-16 11:08:44

您无法对这些按钮做出反应,因为它们直接来自 Word。但您可以获得包含拼写建议的列表。您所要做的就是自己创建一个带有按钮的对话框。

看看我对这个问题的回答。

You can't react to these buttons, as they come from Word directly. But you can get a list with spelling suggestions. All you have to do is to create a dialog with the buttons yourself.

Look at my answer to this question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文