IHTMLDocument2 hyperlinks open in new window
I spent (most) of the day at work today trying to figure out why my IHTMLDocument2’s hyperlinks were opening in new windows, instead of the current window it was in. Finally, I stumbled upon this:
Resolving Hyperlinks.
By the time anyone reads this, MSDN will probably have changed the link structure, so I’ll also explain it here:
If a user clicks a link within an HTML page viewed in MSHTML, MSHTML calls the HlinkNavigate function (after implementing an IHlink interface). If the host does not implement IHlinkFrame, this function launches a separate application to follow the hyperlink.
Wow, that was frustrating!