Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CHtmlView render "http://tp.msn.com" incorrectly

51 views
Skip to first unread message

Big Smith

unread,
Dec 13, 2007, 11:08:40 PM12/13/07
to
http://tp.msn.com is msn's popup message html, I want to link it in my app,

but I found any Webbroswer control implemented IDocHostUIHandler would
render it incorrectly,

Any hint? thanks.

Big Smith


Nathan Moinvaziri

unread,
Dec 14, 2007, 5:10:44 AM12/14/07
to
On Dec 13, 9:08 pm, "Big Smith" <tan...@gmail.com> wrote:
> http://tp.msn.comis msn's popup message html, I want to link it in my app,

Render it incorrectly how?
If you're using IE6, it has rendering issues with certain CSS I've
found, but IE7 works fine.

Nathan

Leslie Milburn

unread,
Dec 14, 2007, 9:17:49 PM12/14/07
to
Hi Big Smith,

I can also confirm that my implementation of IWebBrowser2 interface also
fails to display the text and pictures in the white area on the left. I
don't have time to look at it immediately but maybe/hopefully next week. I
would be interested in the solution if you come across it before then.

Thanks
Leslie

"Big Smith" <tan...@gmail.com> wrote in message
news:O%23WVKRlP...@TK2MSFTNGP04.phx.gbl...
> IE6, IE7 render OK, but CHtmlView or CDhtmlDialog can't show the text,
>
> see attach pic.
>
> Big Smith
> "Nathan Moinvaziri" <nmoin...@gmail.com>
> :36fdaf9b-d4b2-4a2e...@i29g2000prf.googlegroups.com...

Nathan Moinvaziri

unread,
Dec 15, 2007, 3:14:04 AM12/15/07
to
On Dec 14, 7:17 pm, "Leslie Milburn" <CD...@NOSPAM.bigpond.com> wrote:
> Hi Big Smith,
>
> I can also confirm that my implementation of IWebBrowser2 interface also
> fails to display the text and pictures in the white area on the left. I
> don't have time to look at it immediately but maybe/hopefully next week. I
> would be interested in the solution if you come across it before then.
>
> Thanks
> Leslie
>
> "Big Smith" <tan...@gmail.com> wrote in message
>
> news:O%23WVKRlP...@TK2MSFTNGP04.phx.gbl...
>
>
>
> > IE6, IE7 render OK, but CHtmlView or CDhtmlDialog can't show the text,
>
> > see attach pic.
>
> > Big Smith
> > "Nathan Moinvaziri" <nmoinvaz...@gmail.com>
> > :36fdaf9b-d4b2-4a2e-a3c8-d4900c2a3...@i29g2000prf.googlegroups.com...

> >> On Dec 13, 9:08 pm, "Big Smith" <tan...@gmail.com> wrote:
> >>>http://tp.msn.comismsn's popup message html, I want to link it in my

> >>> app,
>
> >>> but I found any Webbroswer control implemented IDocHostUIHandler would
> >>> render it incorrectly,
>
> >>> Any hint? thanks.
>
> >>> Big Smith
>
> >> Render it incorrectly how?
> >> If you're using IE6, it has rendering issues with certain CSS I've
> >> found, but IE7 works fine.
>
> >> Nathan- Hide quoted text -
>
> - Show quoted text -

Trying waiting before taking the screenshot. That is dynamic content.
It takes time. And it does work for me doing so.

Nathan

Nathan Moinvaziri

unread,
Dec 15, 2007, 3:15:19 AM12/15/07
to
On Dec 13, 9:08 pm, "Big Smith" <tan...@gmail.com> wrote:
> http://tp.msn.comis msn's popup message html, I want to link it in my app,

What methods are you using to render it?

Nathan

Leslie Milburn

unread,
Dec 15, 2007, 4:09:35 AM12/15/07
to

"Nathan Moinvaziri" <nmoin...@gmail.com> wrote in message
news:1f201860-db25-4f87...@e23g2000prf.googlegroups.com...

>
> Trying waiting before taking the screenshot. That is dynamic content.
> It takes time. And it does work for me doing so.
>
> Nathan

Hi Nathan,

Is 10 minutes long enough ! Seriously, IE6 is almost instant and so I would
expect iWebbrowser2 to be of a similar time frame. Obviously my
implementation is blocking something - I just do not have time to look at
the moment.

FYI: My implementation is a modified version of the cwebpage.dll project on
Code Project. I have left a question there for other users to see if they
can spot something.

Leslie.


Nathan Moinvaziri

unread,
Dec 16, 2007, 5:15:04 AM12/16/07
to
On Dec 15, 2:09 am, "Leslie Milburn" <CD...@NOSPAM.bigpond.com> wrote:
> "Nathan Moinvaziri" <nmoinvaz...@gmail.com> wrote in message

I guess I was wrong about it being dynamic content. I was mistaken. I
thought I was seeing something else.

But what I am not mistaken about is that it is an issue with IE6
rendering engine. With IE7 it works fine, which is what I was testing
with before. Today, I tested it with IE6 and it doesn't work. Like I
said before, IE6 has certain issues rendering CSS correctly using
atleast through the use of OleDraw. You might be able to grab the HDC
someway if you are really opposed to upgrading to IE7.

Nathan

Leslie Milburn

unread,
Dec 16, 2007, 6:02:03 AM12/16/07
to

"Nathan Moinvaziri" <nmoin...@gmail.com> wrote in message
news:5c886327-306a-4cce...@b1g2000pra.googlegroups.com...

Hi Nathan,

Just to clarify - IE6 (version 6.0.2900.2180.xpsp_sp2_gdr) *is* rendering it
correctly.

It is iWebBrowser2 that is not rendering it correctly (or should I say my
implementation of it or its surrounding interfaces). My guess is that I am
blocking something that maybe should be allowed through.

My post was just to let Big Smith know that it is not just him alone and
that he is not seeing things, but I cannot help to resolve in the next few
days (pre Christmas actually).
Leslie.


Leslie Milburn

unread,
Feb 1, 2008, 8:35:24 AM2/1/08
to

"Big Smith" <tan...@gmail.com> wrote in message
news:exP8DcgP...@TK2MSFTNGP05.phx.gbl...

Hi Big Smith,

Did you ever resolve this problem ?

Leslie.


Leslie Milburn

unread,
Feb 3, 2008, 10:17:04 AM2/3/08
to

"Leslie Milburn" <CD...@NOSPAM.bigpond.com> wrote in message
news:%23bU1RdN...@TK2MSFTNGP06.phx.gbl...

Hi Big Smith,

Ok, I have spent some time on this problem now and I have got a solution.
You need to implement the IDocHostUIHandler::GetExternal() and return the
iDispatch interface of the Control Hosting the Web Browser. My code is in
plain C and is a specific implementation but heres the coding steps you
need:

1. Get the Window Handle of the Control Hosting the Browser.
2. Retrieve its iWebBrowser2 interface.
3. Not sure which is correct but both work: either call
webBroswer2::get_Application() or webBrowser2::get_document() to retrieve
the iDispatch interface.
4. Return S_OK indicating we are supplying an interface.


Heres my code for reference:

HRESULT STDMETHODCALLTYPE UI_GetExternal(IDocHostUIHandler *This,

IDispatch **ppDispatch)
{
IWebBrowser2 *webBrowser2;
HWND hWndHost;
VIEW View;
VWFIELD HostID;

// Get our host window. That was stored in our _IOleInPlaceFrameEx
hWndHost = ((_IOleInPlaceSiteEx *)((char *)This -
sizeof(_IOleInPlaceSiteEx)))->frame.window;

View = vwGetView(hWndHost);
HostID = vwGetField(View, hWndHost);

/* Get the browser's IWebBrowser2 object. */
if (vwGetWebPtrs(View, HostID, &webBrowser2, 0) != S_OK)
{
*ppDispatch = 0;
return S_FALSE;
}

/* Get the IDispatch Interface. */
// webBrowser2->lpVtbl->get_Document(webBrowser2, ppDispatch);

webBrowser2->lpVtbl->get_Application(webBrowser2, ppDispatch);

if (ppDispatch == NULL)
return S_FALSE;

return S_OK;
}

Once I implemented this function, the page renders correctly :-)

Leslie.


0 new messages