如何使用 MFC 处理来自 MS Word 拼写检查器的事件?
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法对这些按钮做出反应,因为它们直接来自 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.