• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

MSHTML - use it over and over?

Started by Edwin Knoppert, September 04, 2011, 05:56:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Edwin Knoppert

#15
When late bound it works fine but i let's forget that for a moment.
I really really tried everything via atl, even your includes and interfaces.
There really may be something different about the dispatch (oWB).
Can you please check with MSHTML code on ATL?
Like i said, using plain html it always worked fine.

Edit:
Goal is a reference to the document, i tried the interfaces because late binding also didn't work, i don't want the interfaces if not needed, just the document dispatch.

José Roca

I really don't understand what you mean with MSHTML code and plain html.

I don't have anything that uses ATL since I wrote my OLE container, and much less using OBJECT CALL, that I always have disliked deeply. Write a compilable example and I will look at it.

Edwin Knoppert

I am using MSHTML to initialize the webcontrol *instead* of using about:blank.
AB requires 'doevents' to complete while MSHTML seems not.
While at first a document for these may not be the same, not sure, but i accomplished this fine using OLECON code but not with atl.
When the MSHTML initializes the webcontrol it was ready to obtain the document object right away and i could then write ordinary html to it (without the MSHTML/xml stuff up front).
So in fact i am trying to get me a document handle from the MSHTML container.
In ATL this keeps failing, i now have an ATL fragment of yours where i have made several kind of attempts to get me a document handle.
Maybe i should abandon this anyway, the document may not be of the same breed??

Anyway, i do have the atl project, i could pm it if you think it's still a valid attempt?


José Roca

You can't get a reference to the document until it has been fully loaded. Attempting to do it will result in a null reference.

If you use my OLE container and the AddWebBrowserControl method of my CWindow class then you don't need to navigate to about:blank and pump windows events because the method does it for you, not because it is not needed.

Edwin Knoppert


Edwin Knoppert

Call me persistant..., i have the idea of handling the messages to the windows i have listed via the messagepump:

Internet Explorer_Hidden
Internet Explorer_Hidden
Shell Embedding
Button
Button
Shell DocObject View
Internet Explorer_Server


I mean that i could simply prevent the messages for other parts of the program by not handling these messages.
In fact that's what i wanted in the first place, no intervening during the load of a webcontrol.
I am not sure it's allowed to post pone certain messages and allow the WC's messages, maybe the messagepump get's mixed up.. (i don't think so)
Disabling a form is very bad.., later :)