Re: how load html page from memory in ShowHTMLDialog function



"ragi" <ragi@xxxxxxxx> wrote in message
news:u7ru0eZeFHA.1356@xxxxxxxxxxxxxxxxxxxx
> Ok. I'm doing sth like that:
>
> pUrlMoniker->SetHTML(wszSummary, bstrURL); <-- here I set my html
>
> HRESULT CHTMLMoniker::SetHTML(LPCOLESTR pszHTML, LPCOLESTR pszBaseURL)
> {
> CComPtr<IStream> spStream;
> ::CreateStreamOnHGlobal( hHTMLContent, TRUE, &m_spStream );
>
> IBindCtx *pbc;
> CreateBindCtx( 0, &pbc );
> return BindToStorage( pbc, NULL, IID_IStream, (void**)&m_spStream
> ); <- here I adding my text (probably)

Again - you do _not_, I repeat _not_, call BindToStorage. You
_implement_ it. Do you understand the difference? You pass your IMoniker
implementation to ShowHTMLDialog, which will turn around and call
BindToStorage on you.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.