Re: Strange NewWindow2 behaivior
- From: Shawn Edward Holland <shawn.holland@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Jan 2007 10:24:12 -0600
Argh! I had all of the control contianment support, I just neglected to
call SetClientSite.
Thanks Igor!
-Shawn
"Igor Tandetnik" <itandetnik@xxxxxxxx> wrote in news:#isFeJIRHHA.1000
@TK2MSFTNGP05.phx.gbl:
Shawn Edward Holland <shawn.holland@xxxxxxxxxxxxxxxxxx> wrote:
Then the main app calls this member function to create the control and
return an IDispatch pointer that is used to set ppdispVal.
****************************************************************
IDispatch* CChildWindow::CreateBrowser()
{
HRESULT hr = CoCreateInstance(CLSID_WebBrowser,
NULL, CLSCTX_INPROC_SERVER,
IID_IWebBrowser2,
reinterpret_cast<void**>(&m_spWB));
CComQIPtr<IOleObject> spOleObject = m_spWB;
HRESULT hr = spOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE,
&msg, this, 0, m_hWnd, &rcClient);
WebBrowser control, like any ActiveX control, needs proper hosting. It
requires a client site object, set via IOleObject::SetClientSite.
See KB article KB192560 "How to add ATL control containment support to
any window in Visual C++"
.
- References:
- Strange NewWindow2 behaivior
- From: Shawn Edward Holland
- Re: Strange NewWindow2 behaivior
- From: Igor Tandetnik
- Strange NewWindow2 behaivior
- Prev by Date: Re: Strange NewWindow2 behaivior
- Next by Date: Accessibility option messing up text size of embedded browser control
- Previous by thread: Re: Strange NewWindow2 behaivior
- Next by thread: Accessibility option messing up text size of embedded browser control
- Index(es):
Relevant Pages
|
|