Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 0.62 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to edit html (tags), before being executed by CppWebBrowser
  2. <NOEMBED><BGSOUND src="/images/ImagineCut.wav"></NOEMBED>
  3.        
  4. <NOEMBED><BGSOUND src="/images/ImagineCut."></NOEMBED>
  5.        
  6. void __fastcall TForm1::CppWebBrowser1DocumentComplete(TObject *Sender,
  7.       LPDISPATCH pDisp, Variant *URL)
  8. {
  9.  
  10. IHTMLDocument2 *pHTMLDoc;
  11. CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument2,(LPVOID*)&pHTMLDoc);
  12. IHTMLElement *pElem;
  13. pHTMLDoc->get_body(&pElem);
  14. BSTR text;
  15. pElem->get_innerHTML(&text);
  16. text = Cleaning(text); //checking and changing html without souds
  17. pElem->put_innerHTML(text);
  18. pElem->Release();
  19. pHTMLDoc->Release();
  20.  
  21. }