I found a few articles on interacting with the MS-Word spell-checker from C# and managed C++ using .NET. (For anyone interested: this and this)
But I couldn't find anything comparable on doing it through standard unmanaged C++ in an MFC app, using COM. I assume the .NET examples are actually using COM meaning it's possible, but is it likely to be horrific and ugly to do?
I did this. It is not that complicated. I packed the whole thing in a DLL and made the suggestions-dialog myself.
Basically it is just opening word and asking it to do a spell-check for a specific single word. If the check failed, you ask for suggestions.
There are only two points where you can fail: 1. a document must be open, that means you always have to create one in code 2. for different word versions, the dictionary sometimes is stored as unicode and sometimes (older versions) not. Of course this is only important if you want to store new words to the user dictionary.
Ok, here's the code:
header file:
And the implementation (only the most important parts, sorry for the german comments -> I will translate them if needed)