I have a Win32 application which converts HTML into an image without displaying the control. (I dont have much experience to use ActiveX in a Win32 application).
I followed this MSDN article to create the control and call Navigate()
: http://msdn.microsoft.com/en-us/library/aa451946.aspx
When I need to convert the image, I call IViewObjec::Draw()
. The problem is the control is always visible even if I call the following function:
browser->put_Visible(VARIANT_FALSE); // browser is IWebBrowser2
When I stepped into the code I found out that when I call
mOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, mControlSite, 0, NULL, NULL)
the control becomes visible immediately. But from what I can see from MSDN is that OLEIVERB_INPLACEACTIVATE
means
Activates an object in place without displaying tools, such as menus and toolbars, that end users need to change the behavior or appearance of the object. Single-clicking such an object causes it to negotiate the display of its user-interface tools with its container. If the container refuses, the object remains active but without its tools displayed.
I am a bit confused, I only want to hide it.