The host I have this example is an Internet Explorer WebBrowser object, and found that to use the object code I do not have much experience of the CPP, I know how to use one, or object Want to How can I get this?
void webhostwnd :: CreateEmbeddedWebControl (void) {OleCreate (CLSID_WebBrowser, IID_IOleObject, OLERENDER_DRAW, 0, & amp; site, & amp; storage, (void **) & amp; mpWebObject); MpWebObject-> Sethostnam (el "web host", el "web view"); // I do not know why it is necessary to comment it out and everything works perfectly. OleSetContainedObject (mpWebObject, true); RECT RECT; GetClientRect (hWnd, & Rect); MpWebObject-> DoVerb (OLEIVERB_SHOW, zero, & site, -1, hwnd, & amp; rect); IWebBrowser2 * iBrowser; MpWebObject-> QueryInterface (IID_IWebBrowser2, (Zero **) & amp; iBrowser); VARIANT vURL; VURL.vt = VT_BSTR; VURL.bstrVal = SysAllocString (el "http://google.com"); Variants V1, V2, V3, V4; Ve1.vt = VT_EMPTY; Ve2.vt = VT_EMPTY; Ve3.vt = VT_EMPTY; Ve4.vt = VT_EMPTY; IBrowser-> Put_Left (0); IBrowser-> Put_Top (0); IBrowser-> Put_Width (rect.right); IBrowser-> Put_height (rect.bottom); IBrowser-> Nvigte2 (& amp; Vurl, & amp; Vel & amp; Ve2, & amp; Ve3, & amp; Ve4); VariantClear (& amp; vURL); IBrowser-> Release (); A button or do use Navigate2 for some examples ()}
mpWebObject is a member of the class webhostwnd . You can use the code,
iWebBrowser2 * iBrowser; MpWebObject-> QueryInterface (IID_IWebBrowser2, (Zero **) & amp; iBrowser);
Browser Interface ( mpWebObject is also a time) anywhere in the classroom to reach created.
If you do not want hell to use the same code, it is a better example that can fulfill your purpose.
Comments
Post a Comment