OnEnumParOrStyle(Object Sender, bool IsControlPar, int StartPos, int Count, IWPParInterface ParText, IWPAttrInterface ParAttr, int EventParam, ref bool Abort);
OnEnumParOrStyle(ByVal IsControlPar As Boolean, ByVal StartPos As Long, ByVal Count As Long, ByVal ParText As WPTDynInt.IWPParInterface, ByVal ParAttr As WPTDynInt.IWPAttrInterface, ByVal EventParam As Long, Abort As Boolean)
In all cases it can be used to extract and modify the text in the editor in a very powerful manner. Since this event is used by so many procedures, please make sure you always use the parameter EventParam to avoid that the wrong code is executed at the wrong time.
The event can be also used to add custom spell checking to your application. In general we recommend to use the internal spellchecking engine. When you order this addon license you will also get a dictionary compiler to create custom dictionaries. But if you have to access your dictionary through an API, for example "bool CheckWord(string word)" you can use this event to do it. First you need to activate the custom spellchecking using Command(907, 1234). (The value 1234 is just an example, any value>0 will work.) Then you add an event handler like this:
private void wpdllInt1_OnEnumParOrStyle(object Sender, bool IsControlPar, int StartPos, int Count, WPDynamic.IWPParInterface ParText, WPDynamic.IWPAttrInterface ParAttr,
int EventParam, ref bool Abort)
Abort = !(MyDictionary.CheckWord(
The boolean Abort is set to true in case the word was not found in the dictionary. Note: To implement a pop up menu the event OnMouseDownWord can be used.