共用方式為


Text Service Variations

Probably the most annoying thing about writing a text service is dealing with all the variations in text stores.  They all have quirks that need to be worked around, and any significant change has to be tested against all the text stores to make sure that nothing broke.   

For example:  Richedit *requires* a composition around any significant text modification (e.g., inserting text followed by moving the selection), or else its undo stack gets messed up. 

Word has problems doing a select/insert when the text ends in a paragraph mark (it leaves an extra paragraph mark at the end; we need to delete the selection before inserting it), as well as serious limitations as to when you can make cross-process COM calls (which is a problem for the Speech Text Service, but may not be relevant for other text services). 

Not every text store supports display attributes.  Even stores that do support display attributes don't always display them (e.g., Wordpad).