🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
1 messages
1 total messages Started by murone Thu, 21 Apr 2005 20:09
TCppWebBrowser load MHT doc from stream
#1085
Author: murone
Date: Thu, 21 Apr 2005 20:09
18 lines
1521 bytes
I can successfully load an html doc from a stream to TCppWebBrowser using 
the code below, but when trying to load an .mht file, the formatting is all 
screwed up. Anyone have any idea how to do this correctly? Thanks

ba

  TMemoryStream *stm = new TMemoryStream();
  Memo1->Lines->SaveToStream(stm);
  IPersistStreamInit *psi;
  stm->Seek(0,0);

 TStreamAdapter *sa = new TStreamAdapter(stm,soReference);

  if(SUCCEEDED(CppWebBrowser1->Document->QueryInterface(IID_IPersistStreamInit,(void 
**)&psi)))
    psi->Load(*sa);

  delete stm;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads