i'm trying to add a webbrowser2 control to my app. i am receiving an 'access violation' when i attempt to create it. access violation is pointing to the following Cwnd function:

BOOL CWnd::InitControlContainer()
{
m_pCtrlCont = afxOccManager->CreateContainer(this);
}

my class definition and 'onupdate' function follows:


class CInitialWnd : public CWnd

private:

CWebBrowser2 m_target;

int CInitialWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;

DWORD dwStyle = WS_VISIBLE | WS_CHILD;
m_target.Create(NULL, dwStyle, CRect(0, 0, 100, 100), this, ID_BROWSER_TARGET);

return 0;
}

thanks in advance,


chris