I have an odd problem. I am using a customised RichTextBox control (System.Windows.Forms.RichTextBox) that displays custom links (by inserting the text then applying CFE_LINK effect to the inserted text). However, I need some extra information that I do not want displayed in the richtextbox. This information I write as text to the link, and apply CFE_HIDDEN effect to it.
The problem is that I am not receiving the extra text when the dll is called from the actual target app (though am in my test app).
The RTB is in a custom control in a dll. For testing, I call this from a basic .Net app. In testing, the LinkClicked event returns the expected text - both hidden and unhidden. This is what I need.
When I use the same form from my VB6 dll (actually an Outlook plugin), LinkClicked fails to return the hidden text. I have tried many things with no success - and I do not understand why the behaviour should be different when the window is called from VB6. If I unhide the text, everything works properly - but this is not something I can do; the text absolutely has to be hidden.
If I could subclass the .Net RTB and trap the EN_LINK notification, then I'm sure that I could resolve the issue. However, I do not know if this is possible without a lot of effort - as to subclass (as far as I am aware), I would need to inherit my custom RTB from System.Windows.Forms.NativeWindow, which would mean I'd have to rewrite pretty much the entire RTB code. Not something I want to do!