HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: James Hancock (---.amtelecom.net)
Date: Monday, 29-May-2006, 22:12:38

I have most of it working, in fact all of it working except for two things.

The first is I can't get my setFlags method to be called. (any help on that would be appreciated for sure!)

The second thing is that I have no idea how to hook up IDocHostUIHandler. Probably because I don't know enough com stuff.

All I've done too this point is Add the HTMLDocumentEvents2 by using IConectionPointContainer etc. and that worked great, I get the events and everything.

But I have no idea how to set it up so that I can get the IDocHostUIHander stuff to work. I've implimented the interface on the inherited System.Windows.Forms.WebBrowser, but it doesn't get fired at all.

I'm sure I'm suposed to do something else, but I haven't a clue what... Anyone have suggestions?

BTW, the only issue I've found so far is that tabbing into the control doesn't work, but I'm fixing that relatively easily with the code from before...

Re: IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: James Hancock (---.amtelecom.net)
Date: Monday, 29-May-2006, 23:21:24

N/m figured it out smiling smiley

Re: IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: James Hancock (---.amtelecom.net)
Date: Tuesday, 30-May-2006, 04:19:24

ERRR.... how about how to impliment IOleDocumentSite???

I need to get the ActivateMe function working and then I'll have all of the focus issues solved... if anyone knows how, I'm giong to be posting new source as soon as I get this and the other two issues I have solved.

That leaves the setFlags and and I've got something weird going on where none of the mouse selection is working. I had this happen once before and I was able to fix it, but I can't remember what I did... I've disabled ALL of the code and it still isn't working, which is odd because it WAS working. Something broke it and I can't figure out what :<

Suggestions or tips on all 3 of these things greatly appreciated!

Once I've got this going, I think it would be worth using this code as a base, because it works directly off of stuff in the .NET framework and we can save a lot of work because a lot of the DOM is already implimented.

And then we should start on inline spell checking, and a table editor smiling smiley

Re: IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: Tim (---.gotadsl.co.uk)
Date: Tuesday, 30-May-2006, 08:46:54

Do you have design mode working reliably?

I agree it would be great to use WebBrowser but all that inaccessible code bothers me.

Another thing: what if you want to parse the DOM without loading the document into the control? Does it work OK with a non-visible instance?

Tim

Re: IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: James Hancock (---.amtelecom.net)
Date: Tuesday, 30-May-2006, 16:23:13

Design mode is working perfectly... at least until I screwed up the mouse selection that was working perfectly before that smiling smiley

And yes, it works perfectly non-visible the way I did it.

And remember, you can always cast to your own IHTMLElement or whatever, so you don't have to use any of their code if you don't want to other than the document host.

Any suggestions on how to get IOleDocumentSite working?

Re: IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: Tim (---.gotadsl.co.uk)
Date: Tuesday, 30-May-2006, 20:22:42

I've run up a quick sample and I can't get SetFlags or ActivateMe called either, at the moment.

Tim

Re: IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: James Hancock (---.amtelecom.net)
Date: Wednesday, 31-May-2006, 04:24:18

OK, we have to get the ActivateMe to work before my focus fix on tabbing into and out of the control will work...

Re: IDocHostUIHandler + Overriding WebBrowser Control in .NET 2.0
Posted by: James Hancock (---.amtelecom.net)
Date: Friday, 02-Jun-2006, 04:08:05

Thought:

I think the reason why it's not working is because we're putting it on the wrong spot. It need to have the IOleDocumentClient on the actual Document.... I'm going to try experimenting with overriding that, which you can do, and see what I get unless I'm daft....



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
pecwH
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.