DLL's run in the same process as mIRC does, so no need to inject anything... Bamaboy's code works great for subclassing.
Edit: I didn't have time to finish this message, so...
I have placed the source I used to subclass the Richtext Edit control on my web site...
Edit: When I rebuilt the project I didn't add the exports file, the updated solution can be downloaded
here.