Web Browser control
-
Hi I create a Dialog, and place a WebBroser control on it. when user insert one media (Window media, Real, QuickTime, Flash). I bulid html string and view on Web Browsercontrol(depend on file to insert, i naviagate from memory use this string (put_innerHtml). this my code: LPDISPATCH lpDispatch = NULL; IHTMLDocument2* lpHtmlDocument= NULL; IHTMLElement* lpBodyElm = NULL; lpDispatch = m_WebCtrlPreview.GetDocument(); if(lpDispatch) { lpDispatch->QueryInterface(IID_IHTMLDocument2, (void**)&lpHtmlDocument); lpDispatch->Release(); } if(lpHtmlDocument) { lpHtmlDocument->get_body(&lpBodyElm); lpHtmlDocument->Release(); } if(lpBodyElm) { BSTR bstrHtml = szHtmlPreview.AllocSysString(); lpBodyElm->put_innerHTML(bstrHtml); SysFreeString(bstrHtml); lpBodyElm->Release(); } szHtmlPrivew is ok, it contains html string to preview media. My Application run well, But when i insert a Quick Time movie (*.mov), it play on Web Browser control, and then i insert another kind of media, my application will appears a critical error. HELP ME Regards Trung Huynh